Bug 102864 - elements APPLET,FIELDSET,FRAME,IFRAME,IMG,INPUT,OBJECT,SELECT,TEXTAREA are not able to host shadow tree
Summary: elements APPLET,FIELDSET,FRAME,IFRAME,IMG,INPUT,OBJECT,SELECT,TEXTAREA are no...
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on: 82313
Blocks: 188643 103230
  Show dependency treegraph
 
Reported: 2012-11-20 20:13 PST by Aleksei Yu. Semenov
Modified: 2019-10-04 22:21 PDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Aleksei Yu. Semenov 2012-11-20 20:13:15 PST
The specification http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html reads:
"The shadow DOM allows multiple DOM trees (in addition to the document tree) to be composed into one larger tree when rendered. The existence of multiple DOM trees is enabled by letting any element in the document tree to host one or more additional DOM trees."

However elements APPLET,FIELDSET,FRAME,IFRAME,IMG,INPUT,OBJECT,SELECT,TEXTAREA are not able to host shadow tree.
Found in Chrome version 23.0.1271.64 m

Example code:

<html>
<head>
<script type="text/javascript">

function A_04_00_01_test(elementName) {
	var d = document;
	var SR = window.ShadowRoot || window.WebKitShadowRoot;

// create element
	var n = d.createElement(elementName);
    d.body.appendChild(n);
    try {
    	var shadowTree1 =  new SR(n);
    	d.write("<P>"+elementName+": OK");
    } catch(e) {
        d.write("<P>"+elementName+": " + e.name + e.message);
    }

}

function test() {
 // uncomment the line you need
  A_04_00_01_test('APPLET');
  A_04_00_01_test('FIELDSET');
  A_04_00_01_test('FRAME');
  A_04_00_01_test('IFRAME');
  A_04_00_01_test('IMG');
  A_04_00_01_test('INPUT');
  A_04_00_01_test('OBJECT');
  A_04_00_01_test('SELECT');
  A_04_00_01_test('TEXTAREA');

}

</script>
</head>
<body onload="test()">

</body>
</html>
Comment 1 Sergey G. Grekhov 2012-12-11 01:45:40 PST
The list from the description is not complete. 'embed', 'video', 'audio', 'canvas', 'progress' and 'meter' cannot be made a Shadow root as well
Comment 2 Simon Pieters 2018-08-15 01:05:41 PDT
https://dom.spec.whatwg.org/#dom-element-attachshadow says which elements are allowed to be shadow root in shadow DOM v1. I think this bug can thus be closed.
Comment 3 Ryosuke Niwa 2019-10-04 22:21:52 PDT
We decided explicitly to not support this in V1 API.