[Bug 20567] Change [[Prototype]] for concept-node-adopt?

https://www.w3.org/Bugs/Public/show_bug.cgi?id=20567

--- Comment #38 from Bobby Holley (:bholley) <bobbyholley@gmail.com> ---
(In reply to Dominic Cooney from comment #37)
> Although Custom Elements are nascent I think a resolution of this bug has to
> include a path for Custom Elements.

Agreed.

> We're currently in the Option 1 world. I think Option 1 is preferable
> because it is simple; the handling of a node adopted into a different
> document behaves the same way as a node removed from a document but kept
> around with a reference from JavaScript. The downside is it is more leaky
> than other options. However other options aren't leak-free anyway, so I
> argue they're not worth the added complexity.

I'm not sure I agree. The difference between leaking an entire scope in 10% of
adoptNode and 100% of adoptNode calls matters a lot, at least in Gecko.

> We (=Blink) tried mightily to implement something like Option 2 for Custom
> Elements. Ultimately it failed because the web developers we were talking to
> found it surprising that Custom Elements became neutered when adopted into a
> different document.

Honestly, anything we do here is going to be surprising. And unfortunately, the
surprise of "hey, I just lead a whole window" is much more subtle and harder to
diagnose. Really I'd rather have crisp and visible behavior, even if
surprising, than introduce an implicit requirement for the UA to do something
pessimal from a performance standpoint.

> In the implementation we got snared on brambles like
> when to deliver the leftView callback for a Custom Element in the process of
> changing prototypes.

I don't understand why this is a problem. leftView fires when the node is
removed from the document, which should occur before the adopt (which is what
would trigger the reparent).

> Explaining what is happening to the developer is super
> complex and implies extra callbacks or something. We couldn't figure it out.

I would like to try to figure it out together. :-)

> I'm happy to go into details but maybe video chat with interested parties
> will be quicker than bug threads.

That's fine with me. Note that I'm in Europe until early November, so earlier
in the day would be better. It would also be helpful to have Blake around,
since I know next to nothing about Web Components. And Blake's been absent
lately. I'll ping him to see if he's around.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Received on Tuesday, 15 October 2013 10:26:11 UTC