Minimally viable DOM Document implementation. A bare-bones HTML DOM in a box. If you want the DOM but not a parser, this might be for you. JSFiddle Demo: Rendering preact components into an undom Document. Undom aims to find a sweet spot between size/performance and utility. The goal is to provide the simplest possible implementation of a DOM Document, such that libraries relying on the DOM can run in places where there isn't one available. The intent to keep things as simple as possible means undom lacks some DOM features like HTML parsing & serialization, Web Components, etc. These features can be added through additional libraries. One task undom doesn't handle for you by default is HTML serialization. A proper implementation of this would be cumbersome to maintain and would rely heavily on getters and setters, which limits browser support. Below is a simple recipe for serializing an undom Element (Document, etc) to HTML.
Features
- Works in Node and browsers, plugins coming soon!
- Bare-bones HTML DOM in a box
- Undom aims to find a sweet spot between size/performance and utility
- Serialize to HTML
- Minimally viable DOM Document implementation
- If you want the DOM but not a parser, this might be for you