You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not trying to sound snarky or unappreciative here. Purely from a place of ignorance and interest, what are the main benefits that this library would hold over an alternative like jsdom?
The text was updated successfully, but these errors were encountered:
Just a different and much smaller implementation, specifically focussed on a few primitives that make up the base that many libraries depend on. JSDOM is targeted specifically at Node, and acts as a polyfill on top of Node's features (example: emulating XMLHttpRequest). This is fairly major overkill for any browser usage.
There is an open issue to better define what "minimal" means in terms of the project's goals, which I think would help explain why undom exists.
Personally, my use-case is similar to the JSFiddle linked in the readme - being able to render virtual DOM into a mock DOM. That means there is no need for the rest of the BOM, and much of DOM level 3. Since undom can be used in any JS environment, my plan is to render to it in a WebWorker or on the server, then sync changes to the real DOM using MutationObserver events.
To sum up: jsdom is an implementation of the BOM, undom is an implementation of Document interface only.
Not trying to sound snarky or unappreciative here. Purely from a place of ignorance and interest, what are the main benefits that this library would hold over an alternative like jsdom?
The text was updated successfully, but these errors were encountered: