linkedom is a lightweight DOM implementation designed for server-side rendering and other environments without a browser DOM. Its triple-linked-list structure aims to keep operations linear and avoid recursion, excessive memory use, and call stack failures on very large documents. It provides DOMParser and parseHTML APIs that return documents, window-like objects, events, elements, and custom element support without polluting global scope. Developers can query content with CSS selectors, create and move nodes, serialize documents, and restore nodes through its JSON format. A worker-focused export supports Deno, Web Workers, and Service Workers without depending strictly on Node.js. LinkeDOM favors speed and minimalism over complete browser emulation, so it is not intended as a fully standards-compliant replacement for JSDOM.
Features
- Triple-linked-list DOM structure
- HTML, XML, and SVG parsing
- Server-side document rendering
- CSS selector queries
- Custom elements and event support
- Document and node JSON serialization