| <!DOCTYPE html> | |
| <script src="../../../resources/js-test.js"></script> | |
| <body> | |
| <script> | |
| description('Tests throwing an exception during registration of constructor'); | |
| if (window.testRunner) | |
| testRunner.dumpAsText(); | |
| var proto = Object.create(HTMLElement.prototype, { | |
| constructor: { | |
| configurable: true, | |
| get: function () { throw "Exception thrown from getter"; } | |
| } | |
| }); | |
| shouldThrow('document.registerElement("x-a", {prototype: proto})', '"Exception thrown from getter"'); | |
| </script> |