OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script src="../../resources/js-test.js"></script> | 3 <script src="../../resources/js-test.js"></script> |
4 </head> | 4 </head> |
5 <body> | 5 <body> |
6 | 6 |
7 <script> | 7 <script> |
8 description("Tests type enforcement on DOM setters."); | 8 description("Tests type enforcement on DOM setters."); |
9 | 9 |
10 // NodeList is not a Node, so document.body can't be set to one. | 10 // NodeList is not a Node, so document.body can't be set to one. |
11 var nodelist = document.getElementsByName('sillypants'); | 11 var nodelist = document.getElementsByName('sillypants'); |
12 shouldThrow("document.body = nodelist;"); | 12 shouldThrow("document.body = nodelist;"); |
13 | |
14 // NodeList is also not an HTMLTableSectionElement. | |
15 var table = document.createElement('table'); | |
16 shouldThrow("table.tHead = nodelist;"); | |
17 </script> | 13 </script> |
18 </body> | 14 </body> |
19 </html> | 15 </html> |
OLD | NEW |