Replace instanceof checks with other logic

This commit is contained in:
ahocevar
2018-10-05 16:16:51 +02:00
parent 96e99e481e
commit 9163558511
40 changed files with 232 additions and 268 deletions
+2 -2
View File
@@ -34,8 +34,8 @@ class IconImage extends EventTarget {
*/
this.image_ = !image ? new Image() : image;
if (crossOrigin !== null && this.image_ instanceof HTMLImageElement) {
this.image_.crossOrigin = crossOrigin;
if (crossOrigin !== null) {
/** @type {HTMLImageElement} */ (this.image_).crossOrigin = crossOrigin;
}
/**