You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 4, 2020. It is now read-only.
The one I'm particularly interested in is doing something with the style property -- so, I was going to add that. But, then I realized that the file I would logically add it to didn't seem to be there at all ...
I'd be happy to go through the web page mentioned above, figure out which of those things are sufficiently standard, and write up an implementation. But I thought I'd ask first, in case there are considerations I'm not thinking of.
I use both addEventListener and the event attributes depending on the context. Generally I prefer to use the attributes because I can repeat a block of code that does without having event handling doubling up.
With the addEventListener interface I have to explicitly call removeEventListener with the handler to avoid repeated event handling.
Activity
[-]Functions on HTMLElement[/-][+]Implementing HTMLElement APIs[/+]garyb commentedon May 16, 2016
Indeed you are right, not sure how I missed this one!
The missing IDL:
We can probably skip the
onevent
attributes though, since event handlers are the preferred way of doing things.rgrempel commentedon May 17, 2016
Thanks!
I'll do some work on this when I get a chance -- but others can feel free to take it up -- I'll post something here when I'm actively working on it.
rgrempel commentedon Oct 17, 2016
Given #59, I think that all that is left is:
Which, as pointed out in #59, all would require some thought.
metasansana commentedon Jun 24, 2017
Hi,
I don't see anything in #59 about the "event handler DOM attributes". Were these intentionally left out?
garyb commentedon Jun 24, 2017
Yeah, I suggested we did't include them - from above:
metasansana commentedon Jun 24, 2017
Ah I missed that thanks.
Isn't that subject to opinion though?
I use both
addEventListener
and the event attributes depending on the context. Generally I prefer to use the attributes because I can repeat a block of code that does without having event handling doubling up.With the
addEventListener
interface I have to explicitly callremoveEventListener
with the handler to avoid repeated event handling.