Re: [w3c/webcomponents] Should custom elements be adoptable if so, how? (#512)

> I think we should throw. That's the easiest path for interoperability, and we can easily change that in the future to any of the other options but we can't do that once we picked any other wrong option.

Do you see a path toward us getting more information in the future, which we don't have now, that allows us to converge on another option? If we have all the information now, punting by choosing throw seems wrong.

---

I spoke to @esprehn and @ajklein about whether throwing is viable from an implementation perspective at BlinkOn. It seems like it is viable for us, however there is a potential issue. During the adoption agency algorithm (which does not _usually_ perform adoption, despite the name) there are a number of element removals and appends. I can't tell for sure but it seems possible you might be able to remove an element and re-insert it into another iframe.

I guess the thing to do in that case would be to add a "catch and report an exception" step to all insertion operations in the parser... not sure if that's OK.

I guess in general we have to worry about the fact that if adopt can throw, any insertion-based operation (insert, append, replace) can also throw now.

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/512#issuecomment-227241682

Received on Monday, 20 June 2016 19:20:13 UTC