happy-dom
21.0.4 · 20 Oct 2026MIT37.8M / weekRepositorynpmAtom feed
15.11.7 is the newest release of 15.x.
In short
1 breaking1 new1 fixed
- Breaking
Drops offical support for Node.js 16.x and 17.x - By @capricorn86 in task #1332
Security
5 advisories affect 15.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
- Criticalhappy-dom allows for server side code to be executed by a <script> tagGHSA-96g7-g7g9-jxw8 · 6 Nov 2024Fixed in 15.10.2
- 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
- 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
Drops offical support for Node.js 16.x and 17.x - By @capricorn86 in task #1332
- Breaking
A lot of internal logic has been refactored, so if you rely on internal APIs, this release may break your code - By @capricorn86 in task #1332
:art: Features
Adds support for
HTMLAreaElement,HTMLBodyElement,HTMLQuoteElement,HTMLBRElement,HTMLTableCaptionElement,HTMLTableColElement,HTMLTableColElement,HTMLDataElement,HTMLDataListElement,HTMLModElement,HTMLDetailsElement,HTMLDivElement,HTMLDListElement,HTMLEmbedElement,HTMLFieldSetElement,HTMLHeadingElement,HTMLHeadElement,HTMLHRElement,HTMLHtmlElement,HTMLModElement,HTMLLegendElement,HTMLLIElement,HTMLMapElement,HTMLMenuElement,HTMLMeterElement,HTMLObjectElement,HTMLOListElement,HTMLOutputElement,HTMLParagraphElement,HTMLParamElement,HTMLPictureElement,HTMLPreElement,HTMLProgressElement,HTMLQuoteElement,HTMLSourceElement,HTMLSpanElement,HTMLTableElement,HTMLTableSectionElement,HTMLTableSectionElement,HTMLTitleElement,HTMLTableRowElement,HTMLTrackElement,HTMLUListElement- By @capricorn86 in task #1332Adds basic support for
HTMLCanvasElement- By @capricorn86 in task #1332Adds support for History API - By @capricorn86 in task #1332
Adds cache to
CSSStyleDeclaration,querySelector(),querySelectorAll(),getElementById(),getElementsByClassName(),getElementsByTagName(),getElementsByTagNameNS(),getElementsByClassName()- By @capricorn86 in task #1332Uses proxy for
NodeList,HTMLCollection,DOMTokenList,TextTrackList,HTMLFormElement,HTMLSelectElementMakes
HTMLCollectionobjects returned bygetElementsByClassName(),getElementsByTagName(),getElementsByTagNameNS()andgetElementsByClassName()live - By @capricorn86 in task #1332Improves support for
HTMLMediaElement- By @capricorn86 in task #1332It now supports all methods and properties of the
HTMLMediaElementinterface
Adds support for
MediaStream,MediaStreamTrack,RemotePlayback,TextTrack,TextTrackCue,TextTrackCueList,TextTrackList,VTTCue,VTTRegion,CanvasCaptureMediaStream,ImageBitmap,OffscreenCanvas- By @capricorn86 in task #1332Adds basic support for
IntersectionObserver- By @capricorn86 in task #1332Uses Array for nodes and elements in the DOM-tree to leverage the JiT compiler better - By @capricorn86 in task #1332
Adds support for
HTMLInputElement.list- By @capricorn86 in task #1332Improves support for
ShadowRoot(it now supportsclonable,serializableandslotAssignment) - By @capricorn86 in task #1332Adds support for
Element.getHTML()- By @capricorn86 in task #1332Improves performance for some pseudo query selectors - By @capricorn86 in task #1332
Improves support for
HTMLSlotElement- By @capricorn86 in task #1332It now supports
assign(),assignedNodes(),assignedElements()and theslotchangeevent
:construction_worker_man: Patch fixes
Attributes and text data wasn't escaped correctly in
XMLSerializer(used by features such asinnerHTML) - By @capricorn86 in task #1265waitForNavigation()would not resolve when navigating to some URLs (e.g. "javascript" or "about:blank") - By @capricorn86 in task #1332CSS rules for gradients where not parsed correctly - By @capricorn86 in task #1332
Updates to CSSStyleDeclaration would not trigger listeners for the "style" attribute - By @capricorn86 in task #1332
Attributes where added to elements after they were added to the DOM during parsing, causing problems for elements loading resources - By @capricorn86 in task #1332
Attr.cloneNode()would not clone internal values - By @capricorn86 in task #1332Document.titleincluded text data inside child elements, which it shouldn't - By @capricorn86 in task #1332Event.preventDefault()shouldn't cancel the default behaviour if cancelable is not sent as an option inEventTarget.dispatchEvent()- By @capricorn86 in task #1332Source attributes containing URLs would not be resolved correctly in some elements - By @capricorn86 in task #1332
Changes name on
TimeRangetoTimeRanges- By @capricorn86 in task #1332Window.parentandWindow.topwould not be set correctly in some scenarios - By @capricorn86 in task #1332
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.