OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src='../../../resources/js-test.js'></script> |
| 3 |
| 4 <div id='console'></div> |
| 5 <template id='temp'> |
| 6 <my-foo id='mf1'></my-foo> |
| 7 <template> |
| 8 <my-foo id='mf2'></my-foo> |
| 9 </template> |
| 10 </template> |
| 11 <script> |
| 12 description(''); |
| 13 var proto = Object.create(HTMLElement.prototype); |
| 14 proto.createdCallback = function() { |
| 15 var message = this.id + ' created\n'; |
| 16 document.getElementById('console').innerText = message; |
| 17 } |
| 18 |
| 19 document.registerElement('my-foo', {prototype: proto}); |
| 20 |
| 21 var template = document.getElementById('temp'); |
| 22 var dom = document.importNode(template.content, true); |
| 23 </script> |
OLD | NEW |