ShadyDOM 1.1.3 breaks dynamic-scoping tests
This is likely related to https://github.com/webcomponents/shadydom/commit/ee372361748163b2f9188996b663297a09acf75d The tests on http://localhost:8000/tests/dynamic-scoping.html?wc-shadydom=true fail, but other configurations are fine.
This is a combination of broken tests in scoping-api.html expecting ShadyDOM to not have implemented the synchronous scoping API, and something else I need to look into.
Ah I see, there is a bug in ShadyDOM related to detecting if unscoping is necessary.
In this table, we assume that getRootNode() will return a Document or ShadowRoot.
However, in disconnected trees, getRootNode() will return the topmost Node, which could be an element, or DocumentFragment, or itself.
In the case where a Node is cloned out of a disconnected tree that was scoped and moved into the Document, we skip removing the scoping. A check for node.isConnected would be the quick fix, but perhaps there is something smarter to do.
Fixed in https://github.com/webcomponents/shadydom/pull/285