# tmpvar/jsdom

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/tmpvar-jsdom).**

21,591 stars · 1,782 forks · JavaScript · MIT

## Links

- GitHub: https://github.com/tmpvar/jsdom
- awesome-repositories: https://awesome-repositories.com/repository/tmpvar-jsdom.md

## Description

jsdom is a Node.js implementation of web standards that functions as a headless browser emulator. It provides a JavaScript execution environment and an HTML and XML parser to simulate a browser environment on the server side, implementing various web APIs and W3C standards.

The project distinguishes itself by providing a sandboxed runtime for executing scripts embedded in HTML or external files. It includes specialized polyfills for the Canvas API and manages session state through HTTP cookie management.

Its broader capabilities cover network interaction via request interception and resource loading, as well as web platform emulation including DOM fragment creation and visual rendering simulation. It can also capture virtual console logs and localize source nodes relative to the original document.

## Tags

### Web Development

- [Headless Browser Emulation](https://awesome-repositories.com/f/web-development/headless-browser-emulation.md) — Provides a full Node.js implementation of web standards to enable headless browser emulation for testing and scraping. ([source](https://github.com/tmpvar/jsdom#readme))
- [Headless Browsers](https://awesome-repositories.com/f/web-development/headless-browsers.md) — Functions as a headless browser engine for rendering pages and executing scripts without a graphical interface.
- [Server Side DOM Manipulation](https://awesome-repositories.com/f/web-development/server-side-dom-manipulation.md) — Provides tools for parsing and modifying HTML or XML documents within a server-side runtime using web APIs.
- [Virtual Browser Globals](https://awesome-repositories.com/f/web-development/virtual-browser-globals.md) — Simulates browser-native global objects like window and document to provide a realistic execution environment.
- [Web Standard Implementations](https://awesome-repositories.com/f/web-development/web-standard-implementations.md) — Implements official W3C web specifications for the DOM, HTML, and CSSOM within a JavaScript runtime.
- [DOM Fragment Parsing](https://awesome-repositories.com/f/web-development/dom-fragment-parsing.md) — Allows parsing strings into lightweight document fragments for efficient manipulation without the overhead of a full window. ([source](https://github.com/tmpvar/jsdom#readme))
- [DOM Serialization](https://awesome-repositories.com/f/web-development/dom-serialization.md) — Transforms the current state of the emulated document object model back into a complete HTML string. ([source](https://github.com/tmpvar/jsdom#readme))
- [External Resource Loading](https://awesome-repositories.com/f/web-development/external-resource-loading.md) — Fetches external assets such as stylesheets and scripts to populate the emulated document.
- [Network Request Interception](https://awesome-repositories.com/f/web-development/network-request-interception.md) — Provides the ability to capture, modify, or mock network calls to control interactions with remote servers during emulation. ([source](https://github.com/tmpvar/jsdom#readme))

### Part of an Awesome List

- [HTML and XML Parsing](https://awesome-repositories.com/f/awesome-lists/data/html-and-xml-parsing.md) — Converts HTML and XML strings into a manipulatable document object model while handling implied tags and encoding. ([source](https://github.com/tmpvar/jsdom#readme))
- [Simulated Browser Environments](https://awesome-repositories.com/f/awesome-lists/devtools/simulated-browser-environments.md) — JavaScript implementation of DOM standards for Node.js.

### Development Tools & Productivity

- [In-Page Script Execution](https://awesome-repositories.com/f/development-tools-productivity/in-page-script-execution.md) — Executes JavaScript embedded within HTML to modify content and access simulated web APIs.
- [Sandboxed Scripting](https://awesome-repositories.com/f/development-tools-productivity/platform-script-execution/dynamic-script-execution-environments/sandboxed-scripting.md) — Provides a restricted execution environment to run page scripts while isolating them from the host system.

### Programming Languages & Runtimes

- [Node.js DOM Implementations](https://awesome-repositories.com/f/programming-languages-runtimes/node-js-dom-implementations.md) — Provides a full JavaScript implementation of the Document Object Model designed to run within the Node.js runtime.
- [XML and HTML Document Parsers](https://awesome-repositories.com/f/programming-languages-runtimes/string-parsing/xml-and-html-document-parsers.md) — Parses HTML and XML strings into in-memory document trees for programmatic traversal and manipulation.
- [API Polyfills](https://awesome-repositories.com/f/programming-languages-runtimes/runtime-execution-environments/runtime-environments/runtimes/javascript-and-web-standard/api-polyfills.md) — Provides browser-like interfaces and API polyfills for standards like the Canvas API within a non-browser environment.

### Testing & Quality Assurance

- [Frontend Unit Testing](https://awesome-repositories.com/f/testing-quality-assurance/node-js-test-automation/frontend-unit-testing.md) — Simulates a browser DOM within Node.js to verify frontend UI logic without launching a full browser.
- [DOM Simulation Rendering](https://awesome-repositories.com/f/testing-quality-assurance/dom-simulation-rendering.md) — Simulates visibility states and animation frames to trigger scripts that normally require a visible browser window. ([source](https://github.com/tmpvar/jsdom#readme))

### User Interface & Experience

- [In-Memory DOM Representations](https://awesome-repositories.com/f/user-interface-experience/dom-manipulation-libraries/in-memory-dom-representations.md) — Implements an in-memory tree structure to represent the document, enabling DOM manipulation without a physical browser screen.

### Content Management & Publishing

- [HTML Serialization](https://awesome-repositories.com/f/content-management-publishing/html-to-document-parsers/html-serialization.md) — Converts the internal in-memory document representation back into a valid HTML string for output.

### Data & Databases

- [Automated Web Scraping](https://awesome-repositories.com/f/data-databases/automated-web-scraping.md) — Facilitates the extraction of structured data from websites by parsing HTML and executing dynamic JavaScript.

### Graphics & Multimedia

- [Canvas and Paint APIs](https://awesome-repositories.com/f/graphics-multimedia/canvas-and-paint-apis.md) — Integrates a full implementation of the standard web drawing interface for graphics and image manipulation. ([source](https://github.com/tmpvar/jsdom#readme))
