This repository was archived by the owner on Oct 4, 2020. It is now read-only.

Description
At the moment, there doesn't seem to be something that you might expect at
src/DOM/HTML/HTMLElement.purs
to cover the various things that you can do with an HTMLElement, for instance, the things here:
https://developer.mozilla.org/en/docs/Web/API/HTMLElement
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.
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
oneventattributes 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
addEventListenerand 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
addEventListenerinterface I have to explicitly callremoveEventListenerwith the handler to avoid repeated event handling.