🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more
Socket
Book a DemoInstallSign in
Socket

happy-dom

Package Overview
Dependencies
Maintainers
1
Versions
696
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

happy-dom

Happy DOM is a JavaScript implementation of a web browser without its graphical user interface. It includes many web standards from WHATWG DOM and HTML.

Source
npmnpm
Version
20.0.0
Version published
Weekly downloads
3M
2.32%
Maintainers
1
Weekly downloads
 
Created
Source

Happy DOM Logo

A JavaScript implementation of a web browser without its graphical user interface.

DOM Features

  • Custom Elements (Web Components)

  • Declarative Shadow DOM

  • Mutation Observer

  • Tree Walker

  • Fetch API

And much more..

Documentation

Documentation | Getting Started | Setup as Test Environment | GitHub

Works With

Vitest | Bun | Jest | Testing Library | Google LitElement | Vue | React | Svelte | Angular

Module Systems

ESM | CommonJS

Performance

OperationJSDOMHappy DOM
Import / Require333 ms45 ms
Parse HTML256 ms26 ms
Serialize HTML65 ms8 ms
Render custom element214 ms19 ms
querySelectorAll('tagname')4.9 ms0.7 ms
querySelectorAll(':nth-child(2n+1)')10.4 ms3.8 ms

See how the test was done here

Keywords

jsdom

FAQs

Package last updated on 09 Oct 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts