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

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

--- Comment #37 from Dominic Cooney <dominicc@chromium.org> ---
(In reply to Bobby Holley (:bholley) from comment #30)
> Option 2 seems like the best option to me. ... WebComponents bindings are
> probably removed. ...

I just wanted to chime in: WebComponents bindings *aren't* removed. To be
specific, Custom Elements currently don't change prototype and their callbacks
continue to fire when moved to a different document.

Although Custom Elements are nascent I think a resolution of this bug has to
include a path for Custom Elements.

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.

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. 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. Explaining what is happening to the developer is super
complex and implies extra callbacks or something. We couldn't figure it out.

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

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

Received on Tuesday, 15 October 2013 02:23:23 UTC