OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../../../resources/js-test.js"></script> | 4 <script src="../../../resources/js-test.js"></script> |
5 <script> | 5 <script> |
6 description("This test ensures that the lifecycle callback of a parser-made elem
ent is visible in following script block.") | 6 description("This test ensures that the lifecycle callback of a parser-made elem
ent is visible in following script block.") |
7 proto = Object.create(HTMLElement.prototype, { createdCallback: { value: functio
n() { window.callbacksCalled = true; } } }); | 7 proto = Object.create(HTMLElement.prototype, { createdCallback: { value: functio
n() { window.callbacksCalled = true; } } }); |
8 document.register("x-foo", { prototype: proto }); | 8 document.registerElement("x-foo", { prototype: proto }); |
9 </script> | 9 </script> |
10 </head> | 10 </head> |
11 <body> | 11 <body> |
12 <x-foo></x-foo> | 12 <x-foo></x-foo> |
13 <script> | 13 <script> |
14 shouldBeTrue("window.callbacksCalled"); | 14 shouldBeTrue("window.callbacksCalled"); |
15 </script> | 15 </script> |
16 </body> | 16 </body> |
17 </html> | 17 </html> |
OLD | NEW |