Re: [whatwg/dom] Proposal to improve the DOM creation api (#150)

@caub, in a few ways it’s similar, like the node name as the first argument and recognizing functions as events. The business with safe attributes to cleverly assign CSS seems like the stuff of **DOM libraries**. I don’t want clever, and I separated my proposal into parts just in case I had anything similarly over-reaching.

![Everyone’s got a gimmick now](http://68.media.tumblr.com/e3fe0e14f647885968cec2ed6fcb53fd/tumblr_o6ys6hfzWc1rxga3jo3_500.gif)

I just want to easily create elements. Elements typically host attributes, events, and other nodes. That’s it. Doing this natively right now is a behemoth.

This proposal doesn’t even solve for namespaced tags or namespaced attributes. And CSS can use selectors.

`.append()` is a fantastic example of a well constructed API. The motivation is simple — I want to append nodes easily. Nodes are typically elements or text.

I think the similarities in libraries does represent a cowpath. I just also think libraries suffer because they are always trying to be so _clever_.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/150#issuecomment-317936503

Received on Wednesday, 26 July 2017 03:23:40 UTC