[dom] Proposal to improve the DOM creation api (#150)

I'm sorry if this topic has been discussed already, I tried to do due diligence but couldn't find a similar proposal on the forums or the html or dom github repos

The DOM creation api is a bit cumbersome to work with To create a single element with several attributes requires several lines of code that repeat the same thing The DOM selection api has received needed features that allow developers to do most DOM manipulation without needing a library However, the DOM creation api still leaves something to be desired which sways developers from using it

There are several use cases where the api is cumbersome to use I have compiled a [gist](https://gistgithubcom/straker/2704727e7ab4802e531c) of just a few of them It shows several use cases where the current api requires an awkward solution, and demonstrates a few common hacks of working around the native api to get a more manageable result It also provides several examples of how popular libraries handle the same use case with a simpler interface

I would like to propose that the DOM creation api be improved so that developers have a cleaner interface into DOM creation and no longer need libraries to do it

---
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/150

Received on Thursday, 14 January 2016 06:29:01 UTC