OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../../js/resources/js-test-pre.js"></script> | 4 <script src="../../js/resources/js-test-pre.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 | 7 |
8 window.callbacksCalled = []; | 8 window.callbacksCalled = []; |
9 | 9 |
10 function fooCreatedFunction() { | 10 function fooCreatedFunction() { |
(...skipping 10 matching lines...) Expand all Loading... |
21 | 21 |
22 document.register("x-foo", { prototype: Object.create(HTMLElement.prototype, { c
reatedCallback: { value: fooCreatedFunction } }) }); | 22 document.register("x-foo", { prototype: Object.create(HTMLElement.prototype, { c
reatedCallback: { value: fooCreatedFunction } }) }); |
23 document.register("x-bar", { prototype: Object.create(HTMLElement.prototype, { c
reatedCallback: { value: barCreatedFunction } }) }); | 23 document.register("x-bar", { prototype: Object.create(HTMLElement.prototype, { c
reatedCallback: { value: barCreatedFunction } }) }); |
24 </script> | 24 </script> |
25 </head> | 25 </head> |
26 <body> | 26 <body> |
27 <script> | 27 <script> |
28 document.createElement("x-foo"); | 28 document.createElement("x-foo"); |
29 shouldBe("window.callbacksCalled", "['X-FOO', 'X-BAR']"); | 29 shouldBe("window.callbacksCalled", "['X-FOO', 'X-BAR']"); |
30 </script> | 30 </script> |
31 <script src="../../js/resources/js-test-post.js"></script> | |
32 </body> | 31 </body> |
33 </html> | 32 </html> |
OLD | NEW |