IDLGenerators: Throw TypeError if custom element is already constructed

Throwing a TypeError instead of an InvalidStateError DOMException
follows the current specification steps.
This commit is contained in:
Tim Ledbetter
2025-02-21 16:45:06 +00:00
committed by Tim Flynn
parent 08b5cae199
commit 7ee33529e8
Notes: github-actions[bot] 2025-02-22 10:40:27 +00:00
5 changed files with 358 additions and 2 deletions

View File

@@ -0,0 +1,14 @@
Harness status: OK
Found 9 tests
9 Pass
Pass Node.prototype.cloneNode(false) must be able to clone a custom element
Pass Node.prototype.cloneNode(false) must be able to clone as a autonomous custom element when it contains is attribute
Pass Node.prototype.cloneNode(false) must be able to clone a custom element inside an iframe
Pass Node.prototype.cloneNode(true) must be able to clone a descendent custom element
Pass Node.prototype.cloneNode(true) must set parentNode, previousSibling, and nextSibling before upgrading custom elements
Pass HTMLElement constructor must throw an TypeError when the top of the construction stack is marked AlreadyConstructed due to a custom element constructor constructing itself after super() call
Pass HTMLElement constructor must throw an TypeError when the top of the construction stack is marked AlreadyConstructed due to a custom element constructor constructing itself before super() call
Pass Upgrading a custom element must throw TypeError when the custom element's constructor returns another element
Pass Inserting an element must not try to upgrade a custom element when it had already failed to upgrade once