Bug 105397 - [Shadow DOM]: ShadowRoot object is not defined error
Summary: [Shadow DOM]: ShadowRoot object is not defined error
Status: RESOLVED DUPLICATE of bug 105385
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
Depends on:
Reported: 2012-12-19 00:02 PST by Sergey G. Grekhov
Modified: 2012-12-19 01:36 PST (History)
3 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Sergey G. Grekhov 2012-12-19 00:02:45 PST
ShadowRoot object is not recognized by instanceof operator. Chrome 25.0.1364.0 canary. Test:

<script type="text/javascript">
function test() {
    if (document instanceof ShadowRoot) {
    	alert('This is the End!');
    }  else {
<body onload="test()">

Observe the console: Uncaught ReferenceError: ShadowRoot is not defined
Comment 1 Hayato Ito 2012-12-19 01:36:39 PST
Nice catch. https://bugs.webkit.org/show_bug.cgi?id=105385 will fix this.

Note that we have to use WebKitShadowRoot instead of SahdowRoot.
  someElement instanceof WebKitShadowRoot.

*** This bug has been marked as a duplicate of bug 105385 ***