Closed SheepFromHeaven closed 5 years ago
if you need it, I think you can just class HTMLUnknownElement extends HTMLElement {}
, right?
'cause I don't see any relevant use case for that class in basicHTML, and this project purpose is not to be yet another jsdom.
@WebReflection basicHTML is recommended in the hyperHTML documentation. As we use it in our open source project, we wanted to test with basicHTML.
Our own inherited class of hyperHTMLElement checks before registering if it's already registered. see here for the code line: https://github.com/biotope/biotope-element/blob/master/src/register.ts#L6
In there we have a check for HTMLUnknownElement.
Should we test this with jsdom rather than basicHTML?
I see. No, it's fine then, but be aware that basicHTML will never return an HTMLUnknownElement
instance, always an HTMLElement
one.
I also don't think jsdom has custom Elements yet so you probably don't have much choices.
Fine
published as 0.20
P.S. interesting project there, seems very similar to HyperHTMLElement but hey, if that works for you, happy hyperHTML served well.
Also, thanks for the PR 👋
@WebReflection we use HyperHtmlElement in there and just enhance it 😄
The global scope is currently not populated with the
HTMLUnknownElement
interface.https://developer.mozilla.org/en-US/docs/Web/API/HTMLUnknownElement
It would be great to have this feature.