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 has been archived by the owner on Nov 15, 2017. It is now read-only.
Since we're always working with objects when generating HTML with DOMBuilder, make some use of them.
How about providing a method on HTMLElement which finds children which have ids and event handling Function attributes and registers events on the elements with the appropriate ids?
Users could call this method after they've toString()ed and innerHTMLed to set up all the event listeners - switching from DOM to HTML mode without changing any element creation code would then be a viable option for people looking for a speedup.
We could generate dummy ids for HTMLElements which have event listening function attributes but no id attribute to make this totally automatic as far as the user is concerned.
Providing a function which takes the element to be innerHTMLed and does both steps would make it even nicer.
The text was updated successfully, but these errors were encountered:
Since we're always working with objects when generating HTML with DOMBuilder, make some use of them.
How about providing a method on
HTMLElement
which finds children which have ids and event handling Function attributes and registers events on the elements with the appropriate ids?Users could call this method after they've
toString()
ed andinnerHTML
ed to set up all the event listeners - switching from DOM to HTML mode without changing any element creation code would then be a viable option for people looking for a speedup.We could generate dummy ids for HTMLElements which have event listening function attributes but no id attribute to make this totally automatic as far as the user is concerned.
Providing a function which takes the element to be
innerHTML
ed and does both steps would make it even nicer.The text was updated successfully, but these errors were encountered: