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

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 UTC