happy-dom
21.0.4 · 20 Oct 2026MIT37.8M / weekRepositorynpmAtom feed
16.8.1 is the newest release of 16.x.
In short
1 breaking1 new4 fixed
- Breaking
Refactors XML and HTML parsing and serialization - By @capricorn86 in task #1615
Security
5 advisories affect 16.0.0; 20.14.6 fixes the others
- CriticalHappy DOM: VM Context Escape can lead to Remote Code ExecutionGHSA-37j7-fg3j-429f · 10 Oct 2025No fix yet
- HighHappy DOM: SSRF via iframe and link stylesheet when parsing untrusted HTMLGHSA-c8p4-j97h-3vg8 · 28 Oct 2026No fix yet
- HighHappy DOM's fetch credentials include uses page-origin cookies instead of target-origin cookiesGHSA-w4gp-fjgq-3q4g · 29 Mar 2026Fixed in 20.8.9
- HighHappy DOM ECMAScriptModuleCompiler: unsanitized export names are interpolated as executable codeGHSA-6q6h-j7hj-3r64 · 26 Mar 2026Fixed in 20.8.8
- ModerateHappy DOM has cookie scope forgery: no DNS-label boundary on Domain= matching , attacker origin sets victim cookiesGHSA-5fpq-26gf-qwcr · 28 Oct 2026Fixed in 20.14.6
Release note
:bomb: Breaking Changes
- Breaking
Refactors XML and HTML parsing and serialization - By @capricorn86 in task #1615
This change may break your tests as the serialized output may differ from v15
:art: Features
Adds support for parsing XML in
DOMParser- By @capricorn86 in task #284Improved performance in
document.write()- By @capricorn86 in task #1615Elements are now added directly to the document during parsing
:construction_worker_man: Patch fixes
Fix for handling
<html>,<head>and<body>during parsing - By @capricorn86 in task #1615Fix for handling HTML entities correctly when parsing and serializing - By @capricorn86 in task #1494 and #1498
Fix for handling attribute names containing "[" or "]" during parsing - By @capricorn86 in task #1638
Fix for handling comments containing HTML tags - By @capricorn86 in task #1630
Fix for handling namespaces in
XMLSerializer- By @capricorn86 in task #1615Handles rules for parsing table elements - By @capricorn86 in task #1126
Loads scripts asynchronously when "defer" is set or "type" is "module" - By @capricorn86 in task #1615
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.