When using HTMLImageElement as new Image() standard triggers a no-undef warning. Is this expected? I mean, Image is global... always :/
It is, in the "browser" environment. Use /* eslint-env browser */ at the
beginning of your file, or (recommended) simply use window.Image.
On Mon, Jul 11, 2016, 12:29 AM Rubén Sospedra [email protected]
wrote:
When using HTMLImageElement
https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement as new
Image() standard triggers a no-undef warning. Is this expected? I mean,
Image is global... always :/—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/feross/standard/issues/562, or mute the thread
https://github.com/notifications/unsubscribe/AAEikZmz6I0Y3UUa0lEuv3_Z-Qdw9FbOks5qUR3vgaJpZM4JI3f3
.
@sospedra we tend to limit the amount of globals exposed in the browser, because there are so many of them. Only window and document are typically exposed. Try running new window.Image() instead. Cheers!
Most helpful comment
@sospedra we tend to limit the amount of globals exposed in the browser, because there are so many of them. Only
windowanddocumentare typically exposed. Try runningnew window.Image()instead. Cheers!