Closed jlrickert closed 2 years ago
What is the JS equivalent of what you're trying to do? Can't you use addLoadEventListener
?
In general we don't support the "set function as a property" event handlers such as image.onload
, since we consider image.addEventListener('load', ...)
to be the more correct way to manage events.
I wasn't aware of addLoadEventListener
. I was going off of the example at https://developer.mozilla.org/en-US/docs/Web/API/createImageBitmap#example where they are mutation onload
directly.
I am trying to draw an image onto a canvas. This is what I am trying to do:
There are two things missing here,
CanvasImageSource
andonloadSet
. TheCanvasImageSource
is related to issue #62 and pr #83.onloadSet
is related to GlobalEventHandlers.onload and is part of the GlobalEventHandlers mixin.