# What changed in @happy-dom/global-registrator

> 109 changes in @happy-dom/global-registrator 20 to 21 from its official release notes, upgrade guides and advisories: 4 breaking, 1 deprecations, 5 security, 17 new APIs and options. Each one cited. Sources checked 2026-10-18. HTML: https://unstale.sh/npm/@happy-dom/global-registrator/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## @happy-dom/global-registrator 21

### Breaking changes

- CSS and IFrame loading are disabled by default to prevent server-side request forgery from untrusted HTML. (21.0.0) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v21.0.0)

### Security

- Fixes a security vulnerability where the authorization header was forwarded when redirecting. (21.0.3) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v21.0.3)

### Deprecations

- The settings property disableCSSFileLoading has been deprecated. (21.0.0) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v21.0.0)

## @happy-dom/global-registrator 20

### Breaking changes

- Cookies from the current origin are no longer forwarded to the target origin in fetch requests. (20.8.9) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.8.9)
- Throws an error if the event passed to EventTarget.dispatchEvent() is not of type Event. (20.8.3) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.8.3)
- The inert attribute now blocks focus interactions. (20.8.1) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.8.1)

### Security

- Fixes a cookie scope forgery vulnerability. (20.14.6) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.14.6)
- Values pushed or assigned to the adoptedStyleSheet array are validated. (20.11.8) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.11.8)
- Fixes executable-code interpolation in ESM export names that could allow escaping the VM context and accessing process-level functionality in unsafe CommonJS environments. (20.8.8) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.8.8)
- EventTarget no longer calls arbitrary on* properties. (20.3.4) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.3.4)

### New APIs and options

- Adds support for the :host pseudo query selector. (20.13.0) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.13.0)
- Adds support for Animation. (20.12.0) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.12.0)
- Adds support for AnimationTimeline. (20.12.0) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.12.0)
- Adds support for DocumentTimeline. (20.12.0) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.12.0)
- Adds support for Element.animate(). (20.12.0) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.12.0)
- Adds support for KeyframeEffect. (20.12.0) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.12.0)
- Allows specifying an explicit element type for querySelector results, such as HTMLInputElement. (20.11.5) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.11.5)
- Adds support for event listener properties on Window, such as Window.onkeydown. (20.9.0) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.9.0)
- Adds support for hasPointerCapture to Element. (20.8.0) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.8.0)
- Adds support for releasePointerCapture to Element. (20.8.0) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.8.0)
- Adds support for setPointerCapture to Element. (20.8.0) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.8.0)
- Adds support for Window.getScreenDetails(). (20.7.0) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.7.0)
- Adds support for registering globals when importing the package. (20.6.0) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.6.0)
- Implements the Text.wholeText property. (20.5.4) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.5.4)
- Adds the which property to KeyboardEvent. (20.3.3) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.3.3)
- Adds support for CloseEvent, making it available to developers using Happy DOM. (20.1.0) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.1.0)
- Adds support for WebSocket, making it available to developers using Happy DOM. (20.1.0) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.1.0)

### Performance

- The computed style cache is improved, which may improve performance. (20.14.0) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.14.0)
- Query selector performance is improved by avoiding DOMException construction when it is not needed. (20.11.1) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.11.1)
- Adds a cache to mitigate the selector parser's performance degradation introduced in v20.6.3. (20.10.5) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.10.5)
- Adds support for caching compiled EcmaScript module code. (20.4.0) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.4.0)
- Improves how nodes are destroyed and garbage collected. (20.4.0) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.4.0)
- Adding and removing tokens is optimized with a Set. (20.3.2) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.3.2)
- Query selectors use Element.classList.contains() instead of splitting className, improving performance because classList is cached. (20.2.0) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.2.0)
- Avoids sorting in querySelector() to improve performance. (20.1.1) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.1.1)

### Behavior and default changes

- Adds support for kebab-case properties on CSSStyleDeclaration. (20.12.1) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.12.1)
- Adds support for all Chromium CSS properties to CSSStyleDeclaration. (20.12.1) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.12.1)
- Adds support for loading image data URLs. (20.10.0) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.10.0)
- Screen now extends EventTarget. (20.7.0) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.7.0)
- The query selector parser can handle complex rules. (20.6.3) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.6.3)
- CSS gradients now support rgba(). (20.6.1) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.6.1)
- HTML/XML encoding and decoding now uses the entities package. (20.5.2) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.5.2)
- Elements are upgraded to custom elements only when they are in the document, which also improves memory footprint by allowing nodes to be garbage collected before the document is closed. (20.0.9) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.0.9)
- Workers in @happy-dom/server-renderer now use the frozen intrinsics flag. (20.0.2) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.0.2)

### Fixes and other changes

- Character references are preserved in comment data. (20.14.5) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.14.5)
- End comments at the first comment end tag when it overlaps a comment start tag. (20.14.4) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.14.4)
- Fixes a regression where not all CSS variables were resolved in getComputedStyle(). (20.14.2) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.14.2)
- Invalidates the computed style cache for the whole subtree. (20.14.1) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.14.1)
- Fixes getComputedStyle with :host and :host-context selectors. (20.13.2) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.13.2)
- GetComputedStyle now returns the inherited value when a property is set to inherit. (20.13.1) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.13.1)
- Custom elements are upgraded when connected to the DOM. (20.12.2) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.12.2)
- Fixes issue with parsing CSS fallback variables. (20.12.1) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.12.1)
- Fixes an issue with upgrading custom elements caused by the previous release. (20.11.15) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.11.15)
- Upgrading an element changes its prototype to the custom element, keeping references to the original element valid. (20.11.14) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.11.14)
- Event listeners are copied when upgrading a custom element. (20.11.13) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.11.13)
- Adds a check that a node is still a parent during disconnect. (20.11.12) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.11.12)
- Returns the default validationMessage for built-in constraint violations. (20.11.10) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.11.10)
- Ensures an element has been upgraded before invoking its reaction callback. (20.11.9) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.11.9)
- Document.adoptedStyleSheets and ShadowRoot.adoptedStyleSheets now validate their value. (20.11.7) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.11.7)
- The CORS check in fetch() now matches origins instead of host and protocol. (20.11.4) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.11.4)
- document.links now returns a live HTMLCollection. (20.11.3) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.11.3)
- Copies the labels array to prevent mutation of a cached querySelectorAll result. (20.11.3) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.11.3)
- Fixes the callback being garbage-collected due to an orphaned WeakRef. (20.11.2) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.11.2)
- Awaits the NodeJS internal ReadableStream promise during teardown. (20.10.6) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.10.6)
- A null qualifiedName is coerced to an empty string in createDocument. (20.10.4) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.10.4)
- Fixes attribute selector matching for hyphenated substrings in CSS selectors. (20.10.3) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.10.3)
- Replaces implementation of Node.js Console with the common IConsole interface to support the latest version of Bun. (20.8.7) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.8.7)
- Request.formData() now honors the Content-Type header. (20.8.6) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.8.6)
- Fixes an error thrown when modifying DOM structure in connectedCallback(). (20.8.5) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.8.5)
- Calling Event.initEvent() resets Event.cancelBubble and Event.defaultPrevented. (20.8.2) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.8.2)
- CSS escape sequences in attribute selector values are now properly decoded. (20.7.2) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.7.2)
- Fixes parsing of direct descendant (>) and universal (*) query selectors. (20.7.1) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.7.1)
- Adds clearImmediate to the Jest environment's global scope. (20.6.5) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.6.5)
- Invalid input type attributes are normalized to text per the HTML specification. (20.6.4) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.6.4)
- Fixes query selectors for attributes in XML documents. (20.6.3) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.6.3)
- Fixes attribute query selectors with quotes inside quoted values. (20.6.3) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.6.3)
- Resolves a missing export affecting Vue and vue-compat v3.5. (20.6.2) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.6.2)
- Selectors now support unicode characters per the CSS spec. (20.6.1) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.6.1)
- Corrects the caption element content model to allow flow content. (20.5.5) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.5.5)
- Node.replaceWith no longer throws when called without a parent. (20.5.3) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.5.3)
- Fixed logic to make HTMLInputElement.stepDown() work according to spec. (20.5.1) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.5.1)
- Fixed logic to make HTMLInputElement.stepUp() work according to spec. (20.5.1) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.5.1)
- Selection API now accepts Document nodes as valid boundary points. (20.3.9) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.3.9)
- Fixed the getters for focusNode and focusOffset, which returned incorrect values. (20.3.8) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.3.8)
- Fixes toggling the open attribute of <details> by clicking a child of <summary>. (20.3.6) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.3.6)
- Checks whether hostname and pathname are undefined using optional chaining. (20.3.5) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.3.5)
- Preserves attribute name case in CSS selectors for XML documents. (20.3.4) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.3.4)
- Implements implicit closing of <p> elements per the HTML spec. (20.3.4) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.3.4)
- Parses the Cache-Control header max-age value with parseFloat(). (20.3.3) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.3.3)
- Fixes Node.contains() for <select> and <form> elements. (20.3.3) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.3.3)
- Returns the correct root for detached shadow trees. (20.3.3) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.3.3)
- Named HTML entities are decoded correctly. (20.3.2) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.3.2)
- WebSocket URLs can include paths. (20.3.2) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.3.2)
- Normalizes the format parameter according to the HTML specification. (20.3.1) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.3.1)
- Handles partial responses. (20.3.1) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.3.1)
- Fixes caching in querySelector(). (20.1.1) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.1.1)
- Manually set authorization headers are now included in requests; headers are omitted only when automatically set by page context. (20.0.11) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.0.11)
- Closing a Window now clears event listeners on all nodes to prevent memory leaks. (20.0.10) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.0.10)
- nextSibling() now works in HTMLSelectElement and HTMLFormElement. (20.0.8) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.0.8)
- previousSibling() now works in HTMLSelectElement and HTMLFormElement. (20.0.8) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.0.8)
- Parsing an item without a permitted parent, such as <tr>, is valid inside a <template> element. (20.0.8) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.0.8)
- Fixes incorrect handling of the >= operator in the media query parser. (20.0.7) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.0.7)
- Changes the implementation to be spec compliant. (20.0.6) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.0.6)
- Changes the implementation to be spec compliant. (20.0.6) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.0.6)
- Changes the implementation to be spec compliant. (20.0.6) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.0.6)
- The setter now validates that the value is a Node. (20.0.5) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.0.5)
- Buttons are added to FormData only if they are the submitter. (20.0.4) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.0.4)
- CSS variables are now parsed correctly when they appear inside CSS functions. (20.0.3) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.0.3)
- URL resolution now occurs after checking whether module preloading is enabled, preventing URL errors when a URL cannot be resolved. (20.0.3) — [release notes](https://github.com/capricorn86/happy-dom/releases/tag/v20.0.3)
