Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add HTMLUnknownElement #136

Open
BlackAsLight opened this issue Apr 26, 2023 · 1 comment
Open

Add HTMLUnknownElement #136

BlackAsLight opened this issue Apr 26, 2023 · 1 comment

Comments

@BlackAsLight
Copy link

I'm trying to figure out if the HTMLElement, or Element in this case, returned from document.createElement is a valid HTML tag. At first the internet suggested I stringify the tag as in the browser the string ends up being [object HTMLUnknownElement] for any invalid Element created, but this doesn't seem to work with deno-dom as it seems to get stringified to [object EventTarget] instead. The next suggestion I found was to try tag instanceof HTMLUnknownElement which does also work in the browser, but from what I can see in the documentation, isn't available here.

If you know of another way to validate weather an Element is a valid HTML tag then I'm all ears, but otherwise I'm asking if you could add support for this.

@b-fuze
Copy link
Owner

b-fuze commented Apr 26, 2023

Yeah, this is a known issue. It basically depends on #128, #73 (and by extension #81), and #4. I need to find some time to implement those so that Deno DOM doesn't see everything as just an Element

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants