W3C home > Mailing lists > Public > www-svg@w3.org > July 2009

Some thoughts on DOM 2.0, Simpler

From: Jeff Schiller <codedread@gmail.com>
Date: Sun, 26 Jul 2009 22:21:54 -0500
Message-ID: <da131fde0907262021n68b2a76bmccd08d3be00f3a64@mail.gmail.com>
To: www-svg <www-svg@w3.org>
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

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.

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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:54:23 UTC