Some thoughts on DOM 2.0, Simpler

As a developer, I'd be very much in favor of an E4X-like or
innerHTML-like solution to
creating elements (as evidenced by my DOMParser hack earlier on the mailing
list).  JSON also feels like a hack and (as mentioned on the wiki)
creating nested elements would be painful and bring back shades of
LISP-like brace counting.  In general I hate having to create
languages using other language/syntax (PHP to create HTML/SVG is
another example of this).

Speaking of creating child elements, I saw mention of a way to create
and automatically insert an element in the DOM.  While this might seem
good, if I wanted to create an animated Rect I'd probably have to
create and insert the rect first, then create and insert the various
animate child elements.  Each of these insertions into the DOM would
take extra time.  Also, wouldn't they cause mutation events to fire or
something?

Seems like it's better to allow the author to create his subtree all
in JS and then push into the DOM with one call.

Just my two or three cents.

Regards,
Jeff Schiller

Received on Monday, 27 July 2009 03:22:39 UTC