Bug 105397
Summary: | [Shadow DOM]: ShadowRoot object is not defined error | ||
---|---|---|---|
Product: | WebKit | Reporter: | Sergey G. Grekhov <sgrekhov> |
Component: | DOM | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | Normal | CC: | hayato, tasak, webcomponents-bugzilla |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Sergey G. Grekhov
ShadowRoot object is not recognized by instanceof operator. Chrome 25.0.1364.0 canary. Test:
<html>
<head>
<script type="text/javascript">
function test() {
if (document instanceof ShadowRoot) {
alert('This is the End!');
} else {
alert('Ok');
}
}
</script>
</head>
<body onload="test()">
</body>
</html>
Observe the console: Uncaught ReferenceError: ShadowRoot is not defined
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Hayato Ito
Nice catch. https://bugs.webkit.org/show_bug.cgi?id=105385 will fix this.
Note that we have to use WebKitShadowRoot instead of SahdowRoot.
e.g.
someElement instanceof WebKitShadowRoot.
*** This bug has been marked as a duplicate of bug 105385 ***