WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
105617
[Shadow DOM]: Some named elements in ShadowTree visible on nesting document level
https://bugs.webkit.org/show_bug.cgi?id=105617
Summary
[Shadow DOM]: Some named elements in ShadowTree visible on nesting document l...
Sergey G. Grekhov
Reported
2012-12-20 22:49:39 PST
According Shadow DOM specification (
https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#upper-boundary-encapsulation
) "The nodes and named elements are not accessible using shadow host's document DOM tree accessors or with Window object named properties". But in fact some named elements are accessible (Chrome 26.0.1366.0 canary). Test: <html> <head> <script type="text/javascript"> function test() { var d = document; var div = d.createElement('div'); d.body.appendChild(div); var s = div.webkitCreateShadowRoot(); //Window named properties var namedElements = ['a', 'applet', 'area', 'embed', 'form', 'frame', 'frameset', 'iframe','img', 'object']; namedElements.forEach(function (tagName) { var element = d.createElement(tagName); element.name = 'named_' + tagName; d.body.appendChild(element); s.appendChild(element); if (element.name in d) { console.log( element.name + ' accessible'); } else { console.log( element.name + ' inaccessible'); } }); } </script> </head> <body onload="test()"> </body> </html> Run this test and observe Chrome console. Result: applet, embed, form, iframe, img and object are visible on the document level.
Attachments
Patch
(14.46 KB, patch)
2012-12-24 20:35 PST
,
Takashi Sakamoto
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Takashi Sakamoto
Comment 1
2012-12-24 20:35:25 PST
Created
attachment 180697
[details]
Patch
WebKit Review Bot
Comment 2
2013-01-05 12:13:07 PST
Comment on
attachment 180697
[details]
Patch Clearing flags on attachment: 180697 Committed
r138897
: <
http://trac.webkit.org/changeset/138897
>
WebKit Review Bot
Comment 3
2013-01-05 12:13:10 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug