WebReflection / linkedom

A triple-linked lists based DOM implementation.
https://webreflection.medium.com/linkedom-a-jsdom-alternative-53dd8f699311
ISC License
1.62k stars 78 forks source link

Added all tags to html class map to support all derived tag type through createElement API #248

Closed Havunen closed 6 months ago

Havunen commented 9 months ago

Fixes https://github.com/WebReflection/linkedom/issues/245

WebReflection commented 6 months ago

ehm ... no ... if you read the how to contribute the classes you see are placeholders.

If no special meaning or type is needed, this is not going to happen because it's crytical on the performance path.

If you ned to check instanceof it means you are using LinkeDOM for testing purpose and I am tired to state this is not the goal of the library so while I really do appreciate your will to contribute, this is not what this library needs + I think your PR is not doing what you think it's doing.

Special elements pollute the parsing and bootstrap all over the place ... anything that behaves like a div is good enough by being just an Element ... everything else, unless really needed, doesn't need to be a special case.

Select and a few others are examples you can see how these get registered, other classes are here to simplify augmenting their presence and nature on the dom, not to have 1:1 instanceof operations.

I am afraid this is not landing as it is.

WebReflection commented 6 months ago

a better answer in here: https://github.com/WebReflection/linkedom/issues/247#issuecomment-1904087838