W3C home > Mailing lists > Public > www-dom@w3.org > January to March 2013

Re: new DOM4 insertions methods and return values

From: Anne van Kesteren <annevk@annevk.nl>
Date: Wed, 16 Jan 2013 09:26:24 +0000
Message-ID: <CADnb78jzKJnbBi1eYQqRR6Pc0zViOQ3jAv-tNBdGmXRmOmos9w@mail.gmail.com>
To: Jake Verbaten <raynos2@gmail.com>
Cc: "www-dom@w3.org" <www-dom@w3.org>
On Wed, Jan 16, 2013 at 1:52 AM, Jake Verbaten <raynos2@gmail.com> wrote:
> It would be useful if append returned either the single node or a
> DocumentFragment

The weird thing with doing this is that it would require the creation
of a DocumentFragment (the specification calls for it too, but it does
not need to be implemented that way currently). If no argument is
passed, should we return null? Does remove() remain void?

> ```js
> var style = document.head.append(
>   document.createElement("style"))
> style.type = "text/css"
> style.textContent = "..."
> ```

Why is the type attribute still set? I see this for <script> sometimes
too and it seems so weird. Is there some old browser that requires it?

Received on Wednesday, 16 January 2013 09:26:56 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:20 UTC