@janmikovsky

> `elem.nodeType === 11`, but unfortunately would also pick up plain document fragments, not just shadow roots

right. makes sense.

> I suppose this could be changed to `element.nodeType === 11 && element instance of WebKitShadowRoot`

I'm not sure we want to do this. First, the vendor specificity weirds me out, though that's a solvable problem. But to address the larger issue..

The nodeType check, from what I can tell, was to originally confirm that `elem` had a `getElementsByTagName` method and later was used as an inference that `innerHTML` was supported. It's better to feature test for the reason of the conditional fork.  

Btw: two of the relevant commits from Resig on this item: https://github.com/jquery/jquery/commit/520f1a26845252dd6d7fd5f3b5bb7779ba91eb2c#L2R180, https://github.com/jquery/jquery/commit/fc4c691

<hr>

Jan, can you try this change and run the tests?