Socket
Socket
Sign inDemoInstall

happy-dom

Package Overview
Dependencies
3
Maintainers
1
Versions
540
Alerts
File Explorer

Advanced tools

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.


Version published
Weekly downloads
660K
increased by1.67%
Maintainers
1
Install size
8.32 MB
Created
Weekly downloads
 

Readme

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

FAQs

Last updated on 07 Apr 2024

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc