W3C home > Mailing lists > Public > www-dom@w3.org > October to December 2011

Re: Improving the DOM

From: Jake Verbaten <raynos2@gmail.com>
Date: Tue, 8 Nov 2011 23:22:32 +0000
Message-ID: <CAMCMjp05F2fAg8bkJ8Y4apaYzM7ag9S1dF7TByq0FPytA1Ap5A@mail.gmail.com>
To: Anne van Kesteren <annevk@opera.com>
Cc: www-dom@w3.org
On Tue, Nov 8, 2011 at 9:30 PM, Anne van Kesteren <annevk@opera.com> wrote:

> Here is a revised proposal based on Ojan's earlier proposal to this list.
> These new methods are subject to compatibility testing.
>
> We introduce a DocumentContent union type (DOMString maps to a Text node):
>
> DOMString | CharacterData | Element | DocumentFragment
>
> We introduce these methods on Element and DocumentFragment:
>
> prepend(DocumentContent... nodes)
> append(DocumentContent... nodes)
>
> We introduce these methods on Element, DocumentFragment, and
> CharacterData:


> before(DocumentContent... nodes)
> after(DocumentContent... nodes)
>

What does DocumentFragment before and after do?


>
> We introduce this method on Element and CharacterData:
>
> replace(DocumentContent... nodes)
>
> We introduce this method on DocumentType, Element, and CharacterData:
>
> remove()
>
>
Why can we remove a DocumentType but not do anything else with it? That
makes the API anti symmetrical to me


> --
> Anne van Kesteren
> http://annevankesteren.nl/
>
>
Received on Tuesday, 8 November 2011 23:23:03 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:14:08 GMT