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

Re: Fwd: Minutes, SVG Telcon, 23 Nov 2009

From: Jeff Schiller <codedread@gmail.com>
Date: Wed, 25 Nov 2009 14:31:35 -0600
Message-ID: <da131fde0911251231p3426b2daqb8997623147b122a@mail.gmail.com>
To: Doug Schepers <schepers@w3.org>
Cc: www-svg <www-svg@w3.org>
Hi Doug,

On Wed, Nov 25, 2009 at 1:38 PM, Doug Schepers <schepers@w3.org> wrote:
>
>> Even then it will be harder to re-train people and will be confusing
>> to tell them when to use Document.createElement() and
>> Element.createElement().
>
> It made more sense to me when the methods I defined (with different names)
> simply inserted the created element as a child of the element this method
> was called on.
>

Actually I agree with you.  Perhaps then we could do the following:

1) Update document.createElement() and document.createElementNS() to
have that third property-bag argument.  These, of course, are the
non-inserting methods.

2) Have new methods on Element that do the inserting:

Element.createChild(elementName, propertyMap, insertionIndex)

As you say, we don't need a namespace-aware method here.  This method
creates and inserts a child in the same namespace.

I'd also be ok with 'insertElement' or 'insertChild' or even
'createElement' though I prefer something that immediately implies
that the newly created element will be inserted (i think 'Child' does
that as does, of course, 'insert').

Regards,
Jeff
Received on Wednesday, 25 November 2009 20:32:15 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:43 GMT