Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Wpt | 4,502 | 8 hours ago | 2,459 | other | HTML | |||||
Test suites for Web platform specs — including WHATWG, W3C, and others | ||||||||||
Happy Dom | 2,458 | 4 | 1,716 | 11 hours ago | 441 | October 27, 2023 | 135 | mit | TypeScript | |
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. | ||||||||||
Dom | 1,474 | a month ago | 193 | other | HTML | |||||
DOM Standard | ||||||||||
Eventlisteneroptions | 1,090 | 6 years ago | 8 | other | JavaScript | |||||
An extension to the DOM event pattern to allow authors to disable support for preventDefault | ||||||||||
Observable | 388 | 9 hours ago | 30 | other | Bikeshed | |||||
Observable API proposal | ||||||||||
Htmlkit | 207 | 11 | 3 years ago | 19 | October 22, 2018 | 5 | mit | HTML | ||
An Objective-C framework for your everyday HTML needs. | ||||||||||
Gammo | 181 | 2 years ago | 3 | October 24, 2021 | 1 | mit | Ruby | |||
A pure Ruby HTML5-compliant parser with CSS selector and XPath 1.0 traversal | ||||||||||
Abort Controller | 155 | 7,596 | 1,618 | 4 years ago | 11 | March 30, 2019 | 5 | mit | TypeScript | |
An implementation of WHATWG AbortController interface. | ||||||||||
Purescript Web Dom | 34 | 21 | a month ago | January 25, 2023 | 10 | mit | PureScript | |||
Type definitions and low level interface implementations for the W3C DOM spec | ||||||||||
Innertext Spec | 14 | 7 years ago | 2 | other | HTML | |||||
Draft specification for DOM "innerText" property |
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.
The goal of Happy DOM is to emulate enough of a web browser to be useful for testing, scraping web sites and server-side rendering.
Happy DOM focuses heavily on performance and can be used as an alternative to JSDOM.
Custom Elements (Web Components)
Shadow Root (Shadow DOM)
Declarative Shadow DOM
Mutation Observer
Tree Walker
Fetch
And much more..
Read more about how to use Happy DOM in our Wiki.
This repository is a Monorepo. Each package lives under packages/<package>
.
This package contains the core functionality of Happy DOM.
This package makes it possible to use Happy DOM with Jest.
A utility that registers Happy DOM globally, which makes it possible to use Happy DOM for testing in a Node environment.
A utility for observing uncaught exceptions thrown in Happy DOM and dispatch them as events on the Happy DOM window.
Operation | JSDOM | Happy DOM |
---|---|---|
Import / Require | 333 ms | 45 ms |
Parse HTML | 256 ms | 26 ms |
Serialize HTML | 65 ms | 8 ms |
Render custom element | 214 ms | 19 ms |
querySelectorAll('tagname') | 4.9 ms | 0.7 ms |
querySelectorAll('.class') | 6.4 ms | 3.7 ms |
querySelectorAll('[attribute]') | 4.0 ms | 1.7 ms |
querySelectorAll('[class~="name"]') | 5.5 ms | 2.9 ms |
querySelectorAll(':nth-child(2n+1)') | 10.4 ms | 3.8 ms |
See how the test was done here
See Contributing Guide.