Newsgroups: mozilla.dev.tech.dom
From: Jonathan Watt <jw...@jwatt.org>
Date: Wed, 05 Aug 2009 10:52:20 +0200
Local: Wed, Aug 5 2009 4:52 am
Subject: Element.createElement proposal
Hi guys,
I've been thinking about what we can do to simplify the creation of new elements It's really tedious and error prone that you have to do: c = document.createElement('NS-people-dont-know-or-want-to-type', 'circle'); Much better would be: c = svgElement.createElement('circle', { cx: 10, cy: 10, r: 10} ); or even just: c = svgElement.createChild('circle', { cx: 10, cy: 10, r: 10} ); Basically, we'd add a createElement method to the Element interface, have it Apparently WebIDL will allow us to have optional arguments (for the attributes To avoid differences with the createElement method on the Document interface, it So it seems to me that the changes proposed are highly desirable from the user's Thoughts? Jonathan You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||