Re: [webcomponents]: Allowing text children of ShadowRoot is a bad time

On Thu, Oct 10, 2013 at 9:30 PM, Dimitri Glazkov <dglazkov@chromium.org> wrote:
> On Thu, Oct 10, 2013 at 1:06 AM, Anne van Kesteren <annevk@annevk.nl> wrote:
>> Either that or let it have its own node type if it's going to be
>> incompatible with DocumentFragment in terms of behavior. Alternatively
>> we could add more hidden state such as "host" which we added for
>> <template>, but that's not exactly great.
>
> There's something to that. ShadowRoot is more like Document than a
> DocumentFragment.

So I guess if we go down this route we'll end up with ShadowRoot
checks in pre-insert. That seems fine.

Then we need to decide whether we want to expose ShadowRoot as
DocumentFragment in terms of nodeType and nodeName, or whether we just
treat those as legacy properties. I don't really care either way I
think, although cross-global instanceof checks are not guaranteed to
work (they do in Gecko at the moment, but I'm not sure that's the
right choice as cross-global instanceof does not work for Array and
such).

I guess I'm glad I haven't integrated ShadowRoot into the DOM Standard yet. :-)


-- 
http://annevankesteren.nl/

Received on Friday, 11 October 2013 08:36:27 UTC