| <!DOCTYPE html> |
| <html> |
| <head> |
| <script src="../../js/resources/js-test-pre.js"></script> |
| <script> |
| description("This test ensures that the lifecycle callback of a parser-made element is visible in following script block.") |
| document.register = document.register || document.webkitRegister; |
| proto = Object.create(HTMLElement.prototype, { readyCallback: { value: function() { window.callbacksCalled = true; } } }); |
| document.register("x-foo", { prototype: proto }); |
| </script> |
| </head> |
| <body> |
| <x-foo></x-foo> |
| <script> |
| shouldBeTrue("window.callbacksCalled"); |
| </script> |
| <script src="../../js/resources/js-test-post.js"></script> |
| </body> |
| </html> |