Re: new DOM4 insertions methods and return values

On Wed, Jan 16, 2013 at 1:52 AM, Jake Verbaten <> 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