| <!DOCTYPE html> |
| <script src="../../../resources/js-test.js"></script> |
| <script src="testutils.js"></script> |
| <body> |
| <x-a></x-a> |
| <script> |
| if (fork()) { |
| // The controlling parent frame |
| description('Tests destroying a context during attributeChanged callback.'); |
| jsTestIsAsync = true; |
| successfullyParsed = true; |
| } else { |
| // The child frame |
| |
| var proto = Object.create(HTMLElement.prototype); |
| proto.attributeChangedCallback = function () { |
| destroyContext(); |
| }; |
| |
| var A = document.registerElement('x-a', {prototype: proto}); |
| var a = new A(); |
| a.id = 'boom'; |
| done(); |
| } |
| </script> |