OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <body> |
| 3 <form style="display:none"> |
| 4 <template id="one"><input></template> |
| 5 </form> |
| 6 <template id="two"><form><template><input></template></form></template> |
| 7 <script src="../../js/resources/js-test-pre.js"></script> |
| 8 <script> |
| 9 description("Form control elements inside templates should not be associated wit
h forms outside the template"); |
| 10 |
| 11 debug('Form in document, input inside template:'); |
| 12 var form = document.querySelector('form'); |
| 13 var input = document.querySelector('#one').content.querySelector('input'); |
| 14 shouldBe('form.length', '0'); |
| 15 shouldBeNull('input.form'); |
| 16 |
| 17 debug('\nForm in template, input in sub-template:'); |
| 18 form = document.querySelector('#two').content.querySelector('form'); |
| 19 input = document.querySelector('#two').content.querySelector('template').content
.querySelector('input'); |
| 20 shouldBe('form.length', '0'); |
| 21 shouldBeNull('input.form'); |
| 22 </script> |
| 23 <script src="../../js/resources/js-test-post.js"></script> |
| 24 </body> |
OLD | NEW |