Re: Convenient way to create element and set its attributes at once
Robin Berjon <[email protected]>
| Newsgroups | gmane.comp.web.dom.general |
|---|---|
| Message-ID | <[email protected]> |
On 03/12/2013 01:11 , Marat Tanalin wrote: > So it's probably not necessary to incorporate them into constructor > itself, and it would probably be sufficient just to have dedicated > methods for setting multiple properties / adding multiple event > listeners at once like: > > element.setProperties(propMap); > element.addEventListeners(eventHandlersMap); I'm not sure that I see what the point would be. The whole value of adding sugar is to make coding the DOM easier, a large part of which is enhancing brevity. We've all written small libraries of the kind that Ian was describing, probably several times over. It's possibly a good idea to boil that into the platform. My primary concern is that there isn't that much of this discussion that isn't bikeshedding. -- Robin Berjon - http://berjon.com/ - @robinberjon