OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <script src="../../../resources/js-test.js"></script> | 2 <script src="../../../resources/js-test.js"></script> |
3 <div id="host"></div> | 3 <div id="host"></div> |
4 <script> | 4 <script> |
5 description('Tests that setting an attribute in Shadow DOM does not cause a cras
h.'); | 5 description('Tests that setting an attribute in Shadow DOM does not cause a cras
h.'); |
6 | 6 |
7 var host = document.querySelector('#host'); | 7 var host = document.querySelector('#host'); |
8 var root = host.createShadowRoot(); | 8 var root = host.createShadowRoot(); |
9 root.innerHTML = '<div></div>'; | 9 root.innerHTML = '<div></div>'; |
10 var elem = root.firstChild; | 10 var elem = root.firstChild; |
11 elem.id = 'bar'; | 11 elem.id = 'bar'; |
12 var attr = elem.attributes.item(); | 12 var attr = elem.attributes.item(); |
13 attr.nodeValue = 'bar'; | 13 attr.value = 'bar'; |
14 var doc2 = document.implementation.createHTMLDocument('Doc 2'); | 14 var doc2 = document.implementation.createHTMLDocument('Doc 2'); |
15 doc2.adoptNode(attr); | 15 doc2.adoptNode(attr); |
16 | 16 |
17 successfullyParsed = true; | 17 successfullyParsed = true; |
18 </script> | 18 </script> |
OLD | NEW |