Re: [whatwg/dom] Clarify create an element assertion (Issue #1338)

Actually, what about this case?

```html
<script>
customElements.define("x-y, asBefore);
</script>

<x-y></x-y>

<script>
const failedCE = document.querySelector("x-y"); // upgrade failed so this has state "failed"

customElements.define("x-z", class extends HTMLElement {
  constructor() {
    return failedCE;
  }
});

const failedCE2 = document.createElement("x-z");
</script>
```

I haven't traced through what this will do all the way, but I'm pretty sure it will make it to the assert line in question with the CE state as "failed", not "custom".

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/1338#issuecomment-2552729446
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/dom/issues/1338/2552729446@github.com>

Received on Thursday, 19 December 2024 04:06:33 UTC