4 ms·
> The only error is that "myImageElem" isn't defined by the snippet, which is to be expected. It's the ID of a DOM element. No need to define it (for me). But
by jdthedisciple 3y ago
> The only error is that "myImageElem" isn't defined by the snippet, which is to be expected.
It's the ID of a DOM element. No need to define it (for me). But anyway still good I will try your code, thanks.
- Dylan16807 3y agoIn that case the only thing you need to make your vanilla code work as typescript is to put the following somewhere: declare var myImageElem: HTMLImageElement;