W3C home > Mailing lists > Public > www-dom@w3.org > April to June 2012

Re: Support getElementById and other methods of ShadowRoot on DocumentFragment

From: Elliott Sprehn <esprehn@gmail.com>
Date: Fri, 29 Jun 2012 11:22:34 -0700
Message-ID: <CAPJYB1jyySRvQrXyRWGFX8uRzxUFgX1Vs2VkfQ2inObUitQW8Q@mail.gmail.com>
To: Ryosuke Niwa <rniwa@webkit.org>
Cc: www-dom <www-dom@w3.org>
On Fri, Jun 29, 2012 at 11:18 AM, Ryosuke Niwa <rniwa@webkit.org> wrote:

> Are you suggesting that getElementsBy* on ShadowRoot will return a static
> node list? If so, that's inconsistent with the existing ones. If not, then
> getElementsBy* return HTMLCollection, and I'm strongly opposed to adding
> any new method that returns live node list or HTMLCollection. They impose
> significant performance burdens and design constraints on all DOM mutations
That's not what the spec says:

*Must* behave exactly like
except scoped<https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#dfn-scoping-constraints>
the shadow DOM subtree.
So it should already return a non-static NodeList. It doesn't make sense to
have methods with the exact same names and different behaviors on Document
vs ShadowRoot.

- E
Received on Friday, 29 June 2012 18:23:22 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:37:00 UTC