jsdom
31.0.1 · 13 Nov 2026MIT166.8M / weekRepositoryHomepagenpmAtom feed
In short
2 removed1 new1 fixed
- Removed
Removed
iframe.sandboxproperty, since it was not implemented and simply crashed when used. - Removed
Removed
element.sourceIndexproperty, since it was nonstandard (Internet Explorer only).
Release note
Added encoding handling
jsdom.env, when given a URL or file, will decode the resulting bytes using signals like theContent-Typeheader,<meta charset>declaration, or presence of a BOM, in the same manner as web browsers.Fetching external resources, via mechanisms such as XMLHttpRequest or
<script>/<link>/<iframe>tags, will also account for such signals.jsdom.jsdom(), which takes a string, still sets a "UTF-8" encoding by default, since there are no bytes or headers for it to sniff an encoding from.
- Removed
Removed
iframe.sandboxproperty, since it was not implemented and simply crashed when used. - Removed
Removed
element.sourceIndexproperty, since it was nonstandard (Internet Explorer only). Fixed setting proxied inline event handlers, such as
doc.body'sonload=""attribute, for documents that do not have a browsing context.
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.