[dom] Pull Request: `document.importNode` and `document.adoptNode` should throw exceptions when acting upon ShadowRoots
Samuel Giles via GitHub <[email protected]> Thu, 25 Jun 2015 18:48:09 +0000
| Newsgroups | gmane.comp.web.dom.general |
|---|---|
| Message-ID | <[email protected]> |
samgiles has just submitted a new pull request for https://github.com/whatwg/dom: == `document.importNode` and `document.adoptNode` should throw exceptions when acting upon ShadowRoots == The `importNode` algorithm relies on a `clone` of `node` however, the Shadow DOM spec stipulates that cloning a `ShadowRoot` should raise a `DataCloneError`. Consequently, importing a `ShadowRoot` should be unsupported. Additionally, it doesn't make sense for a document to `adopt` a `ShadowRoot` - the shadow host and `ShadowRoot` should not have different documents. In this instance a `HierarchyRequestError` seems to make sense. See https://github.com/w3c/webcomponents/issues/125 Using `bikeshed`: Note: I ran `bikeshed update && bikeshed spec` however the updated `dom.html` had spurious other updates to anchors unrelated to this change - first time using `bikeshed`, have I done something wrong here? See https://github.com/whatwg/dom/pull/46