WorkerDOM is a DOM API implementation that runs within a Web Worker.
The project addresses the problem of expensive DOM mutations blocking the main thread by moving intermediate work to a background thread and sending only necessary manipulations forward. It provides a familiar DOM API surface that developers already know, allowing frameworks and code written for the standard DOM to run in a worker context. This approach keeps the main thread available for high-priority updates while asynchronous work proceeds elsewhere.
WorkerDOM suits projects with embedded third-party content that needs to coexist with first-party code, or scenarios where rendering updates do not require synchronous response to user actions. The tool comes in global and module variants, allowing integration either directly into documents or through bundlers. An AMP-specific distribution variant includes hooks for safety features like HTML sanitization. The project maintains broad browser support across desktop, phone, tablet, and webview environments, including older browsers with significant market share.
Development activity shows consistent maintenance with regular releases documented in a changelog. The codebase is entirely written in TypeScript, and local development requires familiarity with npm or yarn and Node.js. The project accepts security disclosures through a formal program and maintains a code of conduct. Most DOM elements and their properties are supported, though DOM query APIs like querySelector have only partial support and browser APIs like History are not yet implemented.