per spec only a whitelist of elements are allowed to have a shadow attached, WebKit allows it for anything that doesn't have a UA shadow like <body> though. Spec: http://w3c.github.io/webcomponents/spec/shadow/#widl-Element-attachShadow-ShadowRoot-ShadowRootInit-shadowRootInitDict Code: http://trac.webkit.org/browser/trunk/Source/WebCore/dom/Element.cpp#L1686
*** This bug has been marked as a duplicate of bug 157706 ***