OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <body> |
| 3 <p>All four boxes below should be green</p> |
| 4 <template><div style="background-image: url(resources/greenbox.png); width: 100p
x; height: 100px; border: 1px solid black"></div><br></template> |
| 5 <script> |
| 6 var template = document.querySelector('template'); |
| 7 document.body.appendChild(template.content.cloneNode(true)); |
| 8 document.body.appendChild(document.importNode(template.content, true)); |
| 9 |
| 10 // Give templateDiv its own ElementData |
| 11 var templateDiv = template.content.firstChild; |
| 12 templateDiv.style.width = '99px'; |
| 13 templateDiv.style.width = '100px'; |
| 14 |
| 15 document.body.appendChild(template.content.cloneNode(true)); |
| 16 document.body.appendChild(document.importNode(template.content, true)); |
| 17 </script> |
| 18 </body> |
OLD | NEW |