unstale

npm / jsdom

jsdom

What changed in jsdom 0.2 to 30, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-17.

240 breaking6 security3 deprecations353 new APIs and options38 performance95 behavior and defaults1 tooling724 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.1.0 on npm

jsdom 30118 changes

Breaking changes 5

  • Cross-origin redirects no longer reuse credentials supplied to xhr.open(), including during destination authentication challenges.

    30.1.3release notes

  • The default blobEvent.timecode is now NaN.

    30.1.0release notes

  • DOM APIs now reject user-created proxies where genuine DOM objects are required.

    30.1.0release notes

  • Storage events are no longer sent to windows created afterward, while surviving recipients still receive events after source destruction.

    30.1.0release notes

  • The minimum supported Node.js version was raised.

    30.0.0release notes

Security 3

  • When withCredentials is false, XMLHttpRequest no longer incorrectly sends or accepts cookies after cross-origin redirects back to the document origin.

    30.1.3release notes

  • Fixed XML HTML serialization to reject invalid attribute characters and avoid stack overflows on large strings.

    30.1.1release notes

  • base elements now ignore data: and javascript: URLs.

    30.1.0release notes

New APIs and options 6

  • Elements can be accessed by name directly on document, such as document.myForm.

    30.1.0release notes

  • Adds QuotaExceededError for storage quota errors and oversized crypto.getRandomValues() requests.

    30.1.0release notes

  • Added the background-position-x CSS property.

    30.0.0release notes

  • Added the background-position-y CSS property.

    30.0.0release notes

  • Added the CSS.escape() function.

    30.0.0release notes

  • Added the CSS.supports() function.

    30.0.0release notes

Performance 9

  • Improved computed style and CSS property read performance, including stylesheets containing attribute selectors.

    30.1.3release notes

  • CSS property definitions now use less package space and memory.

    30.1.2release notes

  • Building large DOM trees is no longer severely slowed, including SVG charts created with D3.

    30.1.2release notes

  • Long-lived MutationObserver instances no longer retain bookkeeping for garbage-collected nodes, reducing memory growth.

    30.1.2release notes

  • DOM construction, tree mutations, range operations, and live collection access are faster, especially on large documents.

    30.1.0release notes

  • Memory use is reduced for DOM nodes, attributes, event listeners, and mutation observers.

    30.1.0release notes

  • Event dispatch, form and label lookups, select updates, and radio-group updates are faster.

    30.1.0release notes

  • Computed-style retrieval, style changes, and CSS serialization are faster.

    30.1.0release notes

  • Range operations on large documents are faster.

    30.0.1release notes

Behavior and default changes 3

  • URLs now support Unicode v18.0.0 in internationalized domain names.

    30.1.2release notes

  • Element, attribute, and document type creation now supports relaxed DOM naming rules.

    30.1.0release notes

  • Retained references continue to provide access to the document and DOM after window.close().

    30.1.0release notes

Fixes and other changes 92

  • Computed background positions now resolve font-relative lengths using the final font size and handle multiple image layers correctly.

    30.1.3release notes

  • Computed color values no longer depend on property read order, including unresolved color-mix() results.

    30.1.3release notes

  • CSS calculations reducing to a percentage no longer incorrectly produce pixel values.

    30.1.3release notes

  • Malformed CSS math functions no longer throw exceptions while parsing documents, stylesheets, and style declarations.

    30.1.3release notes

  • Selector matching now handles XML namespaces and attribute selectors matching empty values and values beginning with a hyphen.

    30.1.3release notes

  • Currentcolor border colors no longer incorrectly become transparent when color uses light-dark() or relative color syntax.

    30.1.3release notes

  • Fixed slowdowns when focusing elements and running interaction tests that regressed in v30.1.2.

    30.1.3release notes

  • Numeric font weights in the font shorthand no longer incorrectly set line-height.

    30.1.3release notes

  • Computed styles now include style rules nested inside multiple @media rules.

    30.1.3release notes

  • CSS shorthands no longer overwrite higher-priority or more-specific longhands during style computation, including declarations with CSS variables.

    30.1.3release notes

  • Shorthand values now resolve consistently with correct defaults and inheritance for background, border, flex, font, margin, and padding.

    30.1.3release notes

  • Deeply nested color-mix expressions now resolve correctly without exceptions.

    30.1.2release notes

  • Deeply nested reads of empty inherited custom properties no longer become exponentially slow, and inheritance stops at an initial reset.

    30.1.2release notes

  • Negative CSS sizing values are no longer incorrectly rejected for min-width, min-height, max-width, and max-height.

    30.1.2release notes

  • focus() no longer focuses elements hidden by display or excluded through shadow DOM slot assignment.

    30.1.2release notes

  • Focus-related selectors and computed styles now update correctly after focus changes, including inside focus and blur listeners.

    30.1.2release notes

  • Computed styles now update after editing declarations, selectors, or media queries, including imported stylesheets.

    30.1.2release notes

  • getComputedStyle() no longer throws for XML and MathML elements without inline-style support.

    30.1.2release notes

  • selectedOptions collections now remain current after selection changes and form resets.

    30.1.2release notes

  • Selectors and computed styles now update correctly after form control state changes, resets, and canceled clicks.

    30.1.2release notes

  • Stylesheet parsing no longer retains the last parsed stylesheet's window after window.close().

    30.1.2release notes

  • Fixed exceptions from truncated charset parameters and incomplete meta tags affecting encoding detection.

    30.1.1release notes

  • Fixed selector matching for :lang(), :nth-child(... of ...), and :has() in mutation and duplicate-ID cases.

    30.1.1release notes

  • Fixed element.focus() incorrectly focusing disabled controls and hidden inputs with tabindex="".

    30.1.1release notes

  • Fixed focus and blur behavior across frames and when focusing the document viewport.

    30.1.1release notes

  • Fixed removed or disabled focus targets becoming active and listener-created text selections being overwritten.

    30.1.1release notes

  • Fixed encoding detection to honor XML declarations and detect UTF-16 without a byte order mark.

    30.1.1release notes

  • Fixed !important handling when updating CSS longhands after shorthands, using variables or CSS-wide keywords, and assigning properties directly.

    30.1.1release notes

  • Fixed noscript parsing with includeNodeLocations or inside frames to honor runScripts.

    30.1.1release notes

  • Fixed the storageQuota option being ignored by frames.

    30.1.1release notes

  • Fixed invalid style.setProperty() calls changing existing !important priorities, serialized styles, or mutation records.

    30.1.1release notes

  • Fixed spurious events and incorrect relatedTarget values after removing the previously focused element.

    30.1.1release notes

  • Fixed XML serialization errors for special namespace names and incorrect reuse of sibling namespace prefixes.

    30.1.1release notes

  • ownerDocument is corrected after adopting or assigning an attribute node across documents.

    30.1.0release notes

  • Adjacent shorthand components, invalid assignments, and unusual CSS declaration characters now parse correctly without inline-style crashes.

    30.1.0release notes

  • Computed border widths are corrected, including borderless elements that incorrectly reported 16px.

    30.1.0release notes

  • Successful cached resource loads are no longer treated as aborted.

    30.1.0release notes

  • Modified CDATA sections and processing instructions now clone, import, and serialize correctly.

    30.1.0release notes

  • The CSS object shape and property descriptors now match expected behavior.

    30.1.0release notes

  • Case-sensitive CSS attribute selector values now retain their correct case sensitivity.

    30.1.0release notes

  • Lengths and percentages inside CSS math functions now resolve correctly to pixels or percentages.

    30.1.0release notes

  • CSS values mixing lengths or percentages with math functions now parse correctly.

    30.1.0release notes

  • Queued work stops after window.close() or iframe removal, preventing new scripts, loads, timers, and animation frames.

    30.1.0release notes

  • currentScript is correct during nested script execution and scripts in shadow trees.

    30.1.0release notes

  • Queries now find matching elements when an earlier element shares the same ID but fails the rest of the selector.

    30.1.0release notes

  • Documents created with createDocument() or createHTMLDocument() now reach readyState complete.

    30.1.0release notes

  • Document replacement, element and doctype placement, and mutations during replaceWith() now follow valid DOM behavior.

    30.1.0release notes

  • Elements from DOMParser-created documents no longer become window named properties or remain retained in memory.

    30.1.0release notes

  • Fresh lookups now use the adopted document's case-sensitivity rules when moving between HTML and XML documents.

    30.1.0release notes

  • Selectors now match when the first selector part matches the element itself.

    30.1.0release notes

  • tagName no longer retains stale casing after adoption between HTML and XML documents.

    18.0.0, 30.1.0release notesrelease notes

  • translate now handles empty translate attributes and elements without parents correctly.

    30.1.0release notes

  • readAsText() now honors the blob MIME charset when no supported explicit encoding is supplied.

    30.1.0release notes

  • Unitless zero values parse correctly, while negative flex-basis lengths and percentages are rejected.

    30.1.0release notes

  • Focus state is corrected after removing a focused element or ancestor, including in shadow trees.

    30.1.0release notes

  • :focus now matches correctly in shadow trees.

    30.1.0release notes

  • getComputedStyle() now resolves font-weight keywords to numeric values.

    30.1.0release notes

  • Repeated calls no longer alter case-sensitive background URLs or inconsistently resolve border shorthands with system colors.

    30.1.0release notes

  • Computed styles now use the correct stylesheet order after style elements are inserted or updated.

    30.1.0release notes

  • Computed styles now account for nested @import and @media rules and update after imports finish loading.

    30.1.0release notes

  • Parent documents no longer wait indefinitely when a child iframe removes itself while loading.

    30.1.0release notes

  • Cloning input elements now preserves input.indeterminate.

    30.1.0release notes

  • input.list now works correctly in detached element trees.

    30.1.0release notes

  • Large valueAsNumber assignments now work for time and local date/time inputs.

    30.1.0release notes

  • Resource loading and JSDOM.fromURL() no longer hang when response handling throws.

    30.1.0release notes

  • Serialization now handles min() and max() containing nested calc().

    30.1.0release notes

  • Mutation observers, abort signals, and storage tracking no longer retain removed nodes, listeners, or closed windows.

    30.1.0release notes

  • Attribute lookups, ID lookups, and element behavior now remain correct after namespace prefix changes.

    30.1.0release notes

  • lookupNamespaceURI() now handles the xml and xmlns prefixes correctly.

    30.1.0release notes

  • NodeIterator traversal now remains correct when its filter removes nodes.

    30.1.0release notes

  • Radio grouping and checkedness now handle differing form owners, external and unnamed controls, and canceled clicks.

    30.1.0release notes

  • CDATA boundary offsets and range cloning, extraction, deletion, insertion, and stringification now work correctly.

    30.1.0release notes

  • Cancellation now works across redirects, pending requestInterceptor() callbacks, and XMLHttpRequest reuse after abort.

    30.1.0release notes

  • Script execution now responds correctly to src, type, for, and event attribute changes.

    30.1.0release notes

  • Inserting children into a connected empty script no longer executes scripts incorrectly.

    30.1.0release notes

  • Ordering is corrected for scripts, custom-element callbacks, iframe loading, and mutation observers during insertion.

    30.1.0release notes

  • Select selection remains correct when options or entire select elements move, and unrelated descendants change.

    30.1.0release notes

  • Style invalidation, stylesheet removal, and frame source updates now work correctly in shadow trees.

    30.1.0release notes

  • Shorthand assignments no longer produce extra mutation records or custom-element callbacks for intermediate values.

    30.1.0release notes

  • viewportElement now resolves correctly inside symbol elements.

    30.1.0release notes

  • normalize() no longer incorrectly removes text nodes or merges their siblings.

    30.1.0release notes

  • Textarea hard wrapping now uses the numeric textarea.cols value.

    30.1.0release notes

  • Time input parsing and serialization now preserve fractional seconds.

    30.1.0release notes

  • volumechange and ratechange events now fire asynchronously.

    30.1.0release notes

  • Named-property collections on window are no longer stale, and empty or namespaced IDs and names no longer create incorrect access.

    30.1.0release notes

  • Event dispatch and window.event now work for non-node targets, including correct default passive listener handling.

    30.1.0release notes

  • Lone surrogates in XML are replaced with the Unicode replacement character.

    30.1.0release notes

  • XPath iterators now invalidate correctly after mutations and report errors for invalid result types.

    30.1.0release notes

  • Fixed getComputedStyle with calc() and other functions throwing exceptions after a regression in v30.0.0.

    30.0.1release notes

  • CSS function serialization was corrected, including values returned by getPropertyValue().

    30.0.0release notes

  • document.evaluate() now throws the correct error type.

    30.0.0release notes

  • Length values returned by getComputedStyle() are now converted into pixels.

    30.0.0release notes

jsdom 2930 changes

Breaking changes 4

  • The keyText getter and setter now validate values.

    29.0.0release notes

  • The selectorText setter now rejects invalid selectors.

    29.0.0release notes

  • MediaList now parses media queries properly; invalid queries become "not all" per spec.

    29.0.0release notes

  • The minimum supported Node.js v22 version is now 22.13.0.

    29.0.0release notes

New APIs and options 8

Performance 3

  • Significantly optimized initial calls before the computed style cache warms up.

    29.1.1release notes

  • getComputedStyle() is significantly faster, reducing the runtime cost of computed-style access.

    29.0.2release notes

  • Document initialization is faster by lazily initializing the CSS selector engine.

    29.0.0release notes

Fixes and other changes 15

  • Fixed computed style computation when using background-origin and background-clip CSS properties.

    29.1.1release notes

  • Fixed computed style serialization for the border-radius CSS property.

    29.1.1release notes

  • Fixed getComputedStyle() sometimes returning outdated results after CSS was modified.

    29.1.0release notes

  • Parsing of the CSS background and border shorthand properties was fixed.

    29.0.2release notes

  • Computed value rules now cover more properties, with fixes for inheritance, defaulting keywords, custom properties, currentcolor, and system colors.

    29.0.2release notes

  • CSS parsing now handles border, background, and their sub-shorthands containing keywords or var().

    29.0.1release notes

  • Returns a more functional CSSStyleDeclaration object with indexed access support, restoring behavior regressed in v29.0.0.

    29.0.1release notes

  • CSSOM serialization, parsing, and API behavior is improved, especially around edge cases.

    29.0.0release notes

  • CSSStyleDeclaration modifications now properly trigger custom element reactions.

    29.0.0release notes

  • The disallow modification flag is now checked in all mutation methods.

    29.0.0release notes

  • getComputedStyle() no longer crashes in XHTML documents containing at-rules.

    29.0.0release notes

  • Nested @media rule parsing now works correctly.

    29.0.0release notes

  • A memory leak when stylesheets were removed from the document has been fixed.

    29.0.0release notes

  • A potential hang in synchronous XMLHttpRequest caused by a worker-thread race condition has been fixed.

    29.0.0release notes

  • The response getter now returns null during the LOADING state instead of parsed JSON.

    29.0.0release notes

jsdom 2820 changes

Breaking changes 2

  • These elements now fire load rather than error events on non-OK HTTP responses.

    28.0.0release notes

  • WebSockets are no longer correctly throttled to one connection per origin, causing a regression.

    28.0.0release notes

New APIs and options 1

Performance 1

  • Synchronous requests avoid about 400ms of repeated setup overhead after the first request.

    28.1.0release notes

Behavior and default changes 1

  • MIME type sniffing was added to iframe and frame loads.

    28.0.0release notes

Fixes and other changes 15

  • Returns the first element in tree order when multiple elements share the same ID.

    28.1.0release notes

  • Restored compatibility when Node.js built-in fetch was used before importing jsdom.

    28.1.0release notes

  • Event timing and result state now more closely follow the specification.

    28.1.0release notes

  • Now accounts for CSS specificity when multiple rules apply.

    28.1.0release notes

  • Correctly handles !important priority.

    28.1.0release notes

  • SVG elements no longer incorrectly proxy event handlers to the Window.

    28.1.0release notes

  • Synchronous requests no longer potentially hang when dispatch errors occur.

    28.1.0release notes

  • Query components of anchor elements now decode correctly in non-UTF-8 documents.

    28.0.0release notes

  • APIs now correctly snapshot data passed through ArrayBuffers.

    28.0.0release notes

  • A redirected document's referrer is now the initiating page rather than the last redirect hop.

    28.0.0release notes

  • APIs now correctly snapshot data passed through typed arrays.

    28.0.0release notes

  • Using WebSockets no longer emits a require("url").parse() deprecation warning.

    28.0.0release notes

  • WebSocket upgrade requests can now be intercepted by customizable resource loading.

    28.0.0release notes

  • XMLHttpRequest fetches can now be intercepted by customizable resource loading, except synchronous requests.

    28.0.0release notes

  • Many small correctness issues in XMLHttpRequest were fixed.

    28.0.0release notes

jsdom 2740 changes

Breaking changes 9

  • XML byte decoding uses UTF-8 more often instead of sniffing meta charset or using the parent frame's encoding.

    27.4.0release notes

  • The minimum supported Node.js versions are now v20.19.0+, v22.12.0+, or v24.0.0+; earlier versions should remain on jsdom v26.1.0.

    27.0.1release notes

  • element.click() now fires a PointerEvent instead of a MouseEvent.

    27.0.0release notes

  • jsdomError events for failed XMLHttpRequest fetches are no longer emitted.

    27.0.0release notes

  • Node.js v20 is now the minimum supported version.

    27.0.0release notes

  • Certain events are now passive by default.

    27.0.0release notes

  • Renamed sendTo() to forwardTo() on the virtual console.

    27.0.0release notes

  • The omitJSDOMErrors boolean option was replaced by jsdomErrors.

    27.0.0release notes

  • The virtual console sendTo() method was renamed to forwardTo().

    27.0.0release notes

New APIs and options 9

  • Added TextDecoder support.

    27.4.0release notes

  • Added TextEncoder support.

    27.4.0release notes

  • Added the BeforeUnloadEvent event constructor.

    27.0.0release notes

  • Added customElements.getName().

    27.0.0release notes

  • Added the DeviceMotionEvent event constructor, without requestPermission().

    27.0.0release notes

  • Added the DeviceOrientationEvent event constructor, without requestPermission().

    27.0.0release notes

  • Added movementX to MouseEvent from the Pointer Lock specification.

    27.0.0release notes

  • Added movementY to MouseEvent from the Pointer Lock specification.

    27.0.0release notes

  • forwardTo() now accepts jsdomErrors to control which errors reach the Node.js console.

    27.0.0release notes

Behavior and default changes 6

  • CSS parsing was improved, which may affect how CSS is interpreted by jsdom.

    27.3.0release notes

  • CSSOM object APIs were improved, which may affect code interacting with parsed CSS objects.

    27.3.0release notes

  • CSS parsing and CSSOM object APIs were improved through updates to @acemir/cssom.

    27.2.0release notes

  • CSS parsing now supports nested selectors, nested declarations, layer statements, and improved at-rule validation.

    27.1.0release notes

  • The input pattern attribute now uses the v regular expression flag instead of u.

    27.0.0release notes

  • The user agent stylesheet is now derived from the HTML Standard.

    27.0.0release notes

Fixes and other changes 16

  • HTML byte decoding is much more correct through use of the new @exodus/bytes package.

    27.4.0release notes

  • Fixed a memory leak when ranges were used and their referenced elements were removed.

    27.4.0release notes

  • @import-ed stylesheets are properly exposed to CSSOM without overwriting sheets created by link or style elements.

    27.2.0release notes

  • The engines field now reflects the minimum Node.js versions required to run jsdom.

    27.1.0release notes

  • Changes to attributes are now picked up correctly by selector cache invalidation.

    27.1.0release notes

  • CSS display style resolution was fixed.

    27.0.0release notes

  • Upgraded cssstyle with various CSS parsing fixes.

    27.0.0release notes

  • CSS system colors now resolve correctly.

    27.0.0release notes

  • document.createEvent() now accepts a more correct set of event names.

    27.0.0release notes

  • Fixed the ElementInternals accessibility getters and setters.

    27.0.0release notes

  • The CSS inherit keyword now resolves correctly.

    27.0.0release notes

  • The CSS initial keyword now resolves correctly.

    27.0.0release notes

  • The url option now updates document.baseURI and properties derived from it.

    27.0.0release notes

  • Fixed Object.defineProperty() on certain objects, including HTMLSelectElement instances.

    27.0.0release notes

  • The CSS unset keyword now resolves correctly.

    27.0.0release notes

  • Fixed specification conformance issues involving named properties and data-to-accessor property changes.

    27.0.0release notes

jsdom 2615 changes

New APIs and options 9

  • Added the SVGSVGElement createSVGRect() method.

    26.1.0release notes

  • Added indexed property support to HTMLFormElement.

    26.1.0release notes

  • Added SVGAnimatedPreserveAspectRatio, including support in the reflection layer.

    26.1.0release notes

  • Added SVGAnimatedRect, including support in the reflection layer.

    26.1.0release notes

  • Added partial support for the SVG defs element and its class.

    26.1.0release notes

  • Added AbortSignal.any().

    26.0.0release notes

  • ElementInternals now supports the labels property for form-associated custom elements.

    26.0.0release notes

  • Initial support makes form-associated custom elements labelable.

    26.0.0release notes

  • Updated whatwg-url adds support for URL.parse().

    26.0.0release notes

Performance 1

  • Various performance improvements were made through caches, microoptimizations, and deferred object creation.

    26.1.0release notes

Behavior and default changes 1

  • Updated CSS dependencies improve CSS parsing capabilities.

    26.0.0release notes

Fixes and other changes 4

  • Updated viewportElement() to correctly establish the viewport based on ancestor elements.

    26.1.0release notes

  • Updated nwsapi improves CSS selector matching.

    26.0.0release notes

  • The returned promise now properly rejects when a server redirects to an invalid URL.

    26.0.0release notes

  • Fixed handling around <noframes> elements and HTML entity decoding.

    26.0.0release notes

jsdom 251 changes

Breaking changes 1

  • The prototype chain stays entirely within jsdom when runScripts is set to dangerously or outside-only, which could change instanceof behavior.

    25.0.0release notes

jsdom 249 changes

Breaking changes 2

  • blur() no longer fires focus or focusin on Document, and blur or focusout no longer set relatedTarget.

    24.1.2release notes

  • :has() support was removed as a functionality regression from reverting to nwsapi.

    24.0.0release notes

New APIs and options 1

  • Added getSetCookie() to the Headers class for retrieving Set-Cookie header values.

    24.1.0release notes

Behavior and default changes 1

  • CSS parsing now supports additional CSS constructs.

    24.1.0release notes

Fixes and other changes 5

  • Bare property calls to postMessage() are fixed to use window.postMessage().

    24.1.3release notes

  • Fixed the in operator when applied to EventTarget methods in Node.js ≥22.5.0.

    24.1.2release notes

  • Selection methods now trigger the selectionchange event on the Document object.

    24.1.1release notes

  • Fixed creation and parsing of elements named after Object.prototype properties such as constructor and toString.

    24.1.0release notes

  • Edge-case behavior was fixed for input.maxLength.

    24.0.0release notes

jsdom 238 changes

Breaking changes 1

  • Node.js v18 is now required as the minimum supported version.

    23.0.0release notes

New APIs and options 2

  • Added string-valued ARIA attribute-reflecting properties to Element.

    23.1.0release notes

  • Added an initial implementation of ElementInternals, including the shadowRoot getter and string-valued ARIA properties.

    23.1.0release notes

Performance 1

  • Selector-heavy workloads may experience a performance regression with the new engine.

    23.2.0release notes

Fixes and other changes 4

  • Now follows the latest specification, including updated handling of empty string inputs and possible new URLs.

    23.1.0release notes

  • Now follows the latest specification, including updated handling of empty string inputs and possible new URLs.

    23.1.0release notes

  • The setter now handles NaN correctly.

    23.1.0release notes

  • Fixed the incorrect canvas peer dependency introduced in v23.0.0.

    23.0.1release notes

jsdom 2210 changes

Breaking changes 1

  • Node.js v16 is now the minimum supported version.

    22.0.0release notes

New APIs and options 6

Fixes and other changes 3

  • DOMParser-created documents now inherit their URL from the creating document.

    22.1.0release notes

  • Color-based properties now resolve named colors and attempt to provide initial inheritance support.

    22.1.0release notes

  • Window event handler properties now reflect the latest list from the standard.

    22.1.0release notes

jsdom 2121 changes

Breaking changes 3

  • Script elements without a src attribute no longer fire load events.

    21.1.0release notes

  • formEl.submit() no longer fires submit events.

    21.1.0release notes

  • The window, document, location, and top properties are now non-configurable.

    21.0.0release notes

New APIs and options 3

  • MouseEvent now includes x, y, pageX, pageY, offsetX, and offsetY properties.

    21.1.0release notes

  • SubmitEvent now exposes the submitter property.

    21.1.0release notes

  • Window.location now has a setter that forwards to location.href, with URL setting implemented only for fragment navigations.

    21.0.0release notes

Performance 1

  • getComputedStyle() now caches results, improving performance.

    21.1.0release notes

Behavior and default changes 2

Fixes and other changes 12

  • Corrected pageX, pageY, offsetX, and offsetY values during MouseEvent dispatch.

    21.1.2release notes

  • Selector engine fixes were included through the nwsapi upgrade.

    21.1.2release notes

  • Corrected the new end index calculated when setRangeText() is used on input and textarea elements.

    21.1.2release notes

  • Several CSS parsing bugs were fixed by replacing cssom with the maintained rweb-cssom parser.

    21.1.1release notes

  • URL changes now propagate to the history API, preventing history.replaceState() from corrupting the URL.

    21.1.1release notes

  • Assigning an empty hash now preserves an existing # in location.href.

    21.1.1release notes

  • getComputedStyle() now correctly applies inheritance for pointer-events.

    21.1.0release notes

  • screenX and screenY now preserve fractional values instead of coercing them to integers.

    21.1.0release notes

  • Removed link stylesheets no longer affect the document.

    21.1.0release notes

  • Deferred script elements added after DOMContentLoaded now execute instead of being skipped.

    21.0.0release notes

  • Several issues with JSDOM.fromURL() in the browser build have been fixed.

    21.0.0release notes

  • selectElement.selectedOptions is now correct when optionElement.selected is set, reverting a related option-appending performance improvement.

    21.0.0release notes

jsdom 2012 changes

Breaking changes 1

  • Node.js v14 is now the minimum supported version.

    20.0.0release notes

New APIs and options 3

  • Added the signal option to addEventListener().

    20.0.0release notes

  • Added crypto.getRandomValues().

    20.0.0release notes

  • Added HTMLFormControlsCollection and RadioNodeList, so formEl.elements now behaves correctly.

    20.0.0release notes

Performance 1

  • Appending option elements to select elements is faster.

    20.0.1release notes

Fixes and other changes 7

  • DOMParser now works on XML documents containing emoji.

    20.0.3release notes

  • Custom element creation is no longer affected by modifications to the window.customElements property.

    20.0.2release notes

  • getModifierState now properly consults the event's ctrlKey, altKey, metaKey, and shiftKey properties.

    20.0.2release notes

  • Calling xhr.abort no longer throws an exception when the constructed XMLHttpRequest is invalid.

    20.0.2release notes

  • The method now accepts typed array subclasses.

    20.0.1release notes

  • The getter no longer crashes for opaque-path URLs, including the default about:blank URL.

    20.0.1release notes

  • Fixed the :root pseudoclass to work correctly.

    20.0.0release notes

jsdom 192 changes

Breaking changes 1

  • Returns undefined for nodes originating from fragment parsing, making node locations reliable with respect to the original document source.

    19.0.0release notes

Fixes and other changes 1

  • Calling window.close inside the Window load event no longer crashes.

    19.0.0release notes

jsdom 1814 changes

Breaking changes 2

  • Almost all Promise and TypeError instances now use the jsdom global, potentially changing instanceof checks.

    18.0.0release notes

  • WebSocket SSL certificate checking now respects ResourceLoader strictSSL, which defaults to true.

    18.0.0release notes

New APIs and options 2

  • AbortSignal now exposes a reason property.

    18.1.0release notes

  • abortSignal.abort() now accepts a reason argument.

    18.1.0release notes

Performance 2

Fixes and other changes 8

  • Fixed connectedCallback firing in situations involving document fragments, which was broken in v18.0.1.

    18.1.1release notes

  • headers.append() now normalizes values.

    18.1.0release notes

  • headers.set() now normalizes values.

    18.1.0release notes

  • pageshow events now have bubbles and cancelable enabled.

    18.1.0release notes

  • Live Ranges now update correctly after calling node.normalize().

    18.0.1release notes

  • Live Ranges now update correctly after child nodes are removed.

    18.0.1release notes

  • Setting valueAsDate to null now sets the value to an empty string instead of throwing.

    18.0.1release notes

  • Form submission no longer occurs when the form is invalid.

    18.0.0release notes

jsdom 171 changes

Breaking changes 1

  • Node v12 is now the minimum supported version, so older Node.js runtimes are no longer supported.

    17.0.0release notes

jsdom 16119 changes

Breaking changes 11

  • Removed ondragexit from Window and related interfaces.

    16.5.0release notes

  • Using the second pseudo-element argument now emits a not-implemented warning, except ::part and ::slotted throw according to the spec.

    16.4.0release notes

  • createDocument now returns an XMLDocument instead of a Document.

    16.2.2release notes

  • StyleSheetList no longer inherits from Array.prototype, improving spec compliance.

    16.2.2release notes

  • When runScripts remains undefined, noscript children are parsed as nodes rather than text.

    16.1.0release notes

  • Removes document.origin.

    16.0.0release notes

  • A more general API replaces dom.runVMScript() for accessing jsdom's internal VM context.

    16.0.0release notes

  • The dom.runVMScript() API was replaced and is no longer available.

    16.0.0release notes

  • Node v10 is now the minimum supported runtime version.

    16.0.0release notes

  • JavaScript-spec-defined globals are exposed uniformly, as outer-environment aliases when disabled and fresh scripting-environment copies when enabled.

    16.0.0release notes

  • Each jsdom Window now creates new instances of all web platform globals instead of sharing constructors and prototypes.

    16.0.0release notes

New APIs and options 20

Performance 2

  • Repeated access to el.tagName is faster, indirectly improving selector matching and style computation.

    16.4.0release notes

  • Improves the performance of getComputedStyle().

    16.0.0release notes

Behavior and default changes 2

  • The return value now includes dummy x and y properties.

    16.7.0release notes

  • Attr now extends Node, aligning its object model with specifications.

    16.1.0release notes

Fixes and other changes 84

  • Fixed incorrect cascade computation in getComputedStyle().

    16.7.0release notes

  • textareaEl.value now applies wrapping when the wrap attribute is specified.

    16.7.0release notes

  • Fixed handling when code running inside jsdom throws null or undefined as an exception.

    16.6.0release notes

  • Fixed several XMLHttpRequest issues around header processing.

    16.6.0release notes

  • Fixed infinite recursion when observing elements inside a MutationObserver callback.

    16.5.3release notes

  • The wildcard header now works with XMLHttpRequest.

    16.5.2release notes

  • Constructed comment nodes now receive the correct ownerDocument.

    16.5.2release notes

  • The returned promise now resolves with the custom element constructor.

    16.5.2release notes

  • HTML parsing now treats noscript elements appropriately.

    16.5.2release notes

  • Inline event handlers now behave correctly when globals named element or formOwner exist.

    16.5.2release notes

  • Validity checking now works for controls associated through the form attribute outside the form element.

    16.5.2release notes

  • Canceling a checkbox or radio click now restores the previous indeterminate value.

    16.5.2release notes

  • The form property now correctly reflects the legend's parent fieldset.

    16.5.2release notes

  • NodeIterator remains functional beyond ten instances and uses less memory from inactive iterators.

    16.5.2release notes

  • The text property now excludes script descendants.

    16.5.2release notes

  • Disconnected radio buttons and checkboxes no longer fire input and change events.

    16.5.2release notes

  • SVG templates now parse without throwing and use the SVG namespace.

    16.5.2release notes

  • Constructed text nodes now receive the correct ownerDocument.

    16.5.2release notes

  • JSON responses now strip a leading BOM when responseType is json.

    16.5.2release notes

  • Restores customElements.get() after a regression in v16.5.0.

    16.5.1release notes

  • Adds a setter so window.event can be overwritten and globals named event can be assigned in the jsdom context.

    16.5.1release notes

  • about:blank iframe URLs no longer incorrectly inherit the parent URL.

    16.5.0release notes

  • Fixed edge cases involving callback functions and event handlers.

    16.5.0release notes

  • Fixed a potential memory leak involving custom elements.

    16.5.0release notes

  • Fixed edge cases involving properties of proxy-like objects such as dataset.

    16.5.0release notes

  • new File() no longer converts slash characters to colons.

    16.5.0release notes

  • Filesystem subresources now load correctly when filenames contain non-ASCII characters.

    16.5.0release notes

  • The hidden attribute now causes display: none according to the user-agent stylesheet.

    16.5.0release notes

  • Checkbox inputs remain mutable when disabled.

    16.5.0release notes

  • Radio inputs remain mutable when disabled.

    16.5.0release notes

  • Fixed edge cases involving properties of proxy-like objects such as localStorage.

    16.5.0release notes

  • Mutation observer callbacks now receive the MutationObserver instance as their this value.

    16.5.0release notes

  • xhr.response now returns null for failures occurring during download.

    16.5.0release notes

  • Cross-origin XMLHttpRequest responses now expose the Content-Length header.

    16.5.0release notes

  • XMLHttpRequest no longer fires a redundant final progress event with the same loaded value.

    16.5.0release notes

  • draggable="" attribute processing now uses ASCII case-insensitivity instead of Unicode case-insensitivity.

    16.4.0release notes

  • el.focus() now does nothing when called on disconnected elements.

    16.4.0release notes

  • el.focus() now works on SVG elements.

    16.4.0release notes

  • Removing the currently focused element now moves focus to the body element.

    16.4.0release notes

  • form.elements now respects form="" and can contain non-descendant form controls.

    16.4.0release notes

  • imgEl.complete now returns true for images with empty or unset src attributes.

    16.4.0release notes

  • With canvas enabled, imgEl.complete now returns true when an image-loading error occurs.

    16.4.0release notes

  • imgEl.complete now returns false when an image's src attribute is reset to an empty value.

    16.4.0release notes

  • translate="" attribute processing now uses ASCII case-insensitivity instead of Unicode case-insensitivity.

    16.4.0release notes

  • The valueMissing validation check for radio inputs is corrected.

    16.4.0release notes

  • Drawing an empty canvas into another canvas now works correctly.

    16.3.0release notes

  • Elements with the contenteditable="" attribute are now considered focusable.

    16.3.0release notes

  • A second failing image load now fires an error event instead of sometimes firing load when canvas is installed.

    16.3.0release notes

  • el.focus() and el.blur() now fire focusin and focusout events.

    16.3.0release notes

  • Edge-case behavior for event listener objects with handleEvent properties is fixed.

    16.3.0release notes

  • NodeFilter is now scoped per Window instead of shared across all Windows.

    16.3.0release notes

  • DOM objects can now be used as addEventListener arguments without triggering errors.

    16.2.2release notes

  • Running jsdom in a browser now detects globals more reliably.

    16.2.2release notes

  • Calling click on a label or descendant no longer causes infinite recursion.

    16.2.2release notes

  • Closing a window with outstanding requests to data URLs no longer causes errors.

    16.2.2release notes

  • The del cite property now properly reflects its value as a URL.

    16.2.2release notes

  • getComputedStyle now accounts for inline style attributes.

    16.2.2release notes

  • Month input values are now consistent across affected time zones and times.

    16.2.2release notes

  • The input src property now properly reflects its value as a URL.

    16.2.2release notes

  • The ins cite property now properly reflects its value as a URL.

    16.2.2release notes

  • requestAnimationFrame no longer prevents the Node.js process from exiting.

    16.2.2release notes

  • Updating a select element's value now invalidates dependent properties such as selectedOptions.

    16.2.2release notes

  • setTimeout no longer leaks closures passed to it.

    16.2.2release notes

  • Number input stepUp and stepDown now use decimal-based calculations instead of floating point calculations.

    16.2.2release notes

  • Window event methods now properly inherit from EventTarget instead of being distinct functions.

    16.2.2release notes

  • Fixed issues using Attr as a Node, including checking baseURI and calling cloneNode().

    16.2.0release notes

  • Fixed edge cases in number/string conversion for element properties reflecting integer attributes.

    16.2.0release notes

  • Fixed a memory leak during parsing introduced in v14.0.0.

    16.2.0release notes

  • Fixed selection-related issues when manipulating input and textarea values.

    16.1.0release notes

  • Handling of rgba() and hsl() colors now includes fixes through cssstyle v2.1.0.

    16.1.0release notes

  • Fixed timer and animation-frame issues, especially around window closing and recursive calls.

    16.1.0release notes

  • Changing an input element's type attribute now behaves correctly.

    16.0.1release notes

  • Validation now behaves correctly when a range input's max value is less than its min value.

    16.0.1release notes

  • Node v10 and v11 support now works when runScripts is set.

    16.0.1release notes

  • fileReader.readAsDataURL() now always base64-encodes the result.

    16.0.0release notes

  • Inserting img elements into documents without a browsing context no longer crashes when canvas is installed.

    16.0.0release notes

  • Fixes validation for email inputs using multiple and pattern attributes.

    16.0.0release notes

  • Fixes incorrect validation errors on readonly input elements.

    16.0.0release notes

  • Fixes validation errors for fractional input values when step is fractional.

    16.0.0release notes

  • input.type now defaults to text.

    16.0.0release notes

  • Fixes character encoding detection when documents use meta charset declarations.

    16.0.0release notes

  • Fixes template elements so they work correctly inside XML documents.

    16.0.0release notes

  • Fixes a memory leak when using window.setInterval().

    16.0.0release notes

  • Fixes a memory leak when using window.setTimeout().

    16.0.0release notes

jsdom 1532 changes

Breaking changes 8

  • Changed the exception thrown when attaching a shadow root to something already acting as a shadow host.

    15.2.0release notes

  • Changed el.tabIndex's default value when no tabindex attribute is set to reflect the updated specification.

    15.2.0release notes

  • selectEl.value now returns the empty string when no option is selected instead of the first option's value.

    15.2.0release notes

  • element.tagName now uses the ASCII uppercase of the element's qualified name instead of Unicode uppercase.

    15.1.1release notes

  • The endings: "native" option now converts line endings to \n on all operating systems.

    15.0.0release notes

  • When parsing binary input, charset now overrides sniffed encoding instead of being ignored.

    15.0.0release notes

  • The endings: "native" option now converts line endings to \n on all operating systems.

    15.0.0release notes

  • Now treats .xht files as application/xhtml+xml instead of text/html, matching .xhtml and .xml handling.

    15.0.0release notes

New APIs and options 5

  • Added shadowRoot.activeElement.

    15.2.0release notes

  • Added a form.requestSubmit() stub to match the existing form.submit() stub.

    15.2.0release notes

  • Added readystatechange events during document loading.

    15.2.0release notes

  • Added the element.translate getter and setter.

    15.1.0release notes

  • Added the Headers class from the Fetch standard.

    15.1.0release notes

Behavior and default changes 2

  • Added basic style inheritance for visibility in getComputedStyle(), laying groundwork for further inheritance, cascading, and specificity work.

    15.2.0release notes

  • The nonce property moved from HTMLScriptElement and HTMLStyleElement to HTMLElement, remaining a simple reflection of the attribute.

    15.1.1release notes

Tooling 1

  • Set canvas as an optional peer dependency, which helps Yarn PnP support.

    15.2.0release notes

Fixes and other changes 16

  • Focusing an already-focused element now does nothing instead of firing additional focus events.

    15.2.1release notes

  • URL hashes are no longer sent to the server or duplicated when constructing the Document.

    15.2.1release notes

  • Namespaced attribute selectors are handled correctly by the selector engine.

    15.2.1release notes

  • WebKit-prefixed pseudo-elements are handled correctly by the selector engine.

    15.2.1release notes

  • Fixed various correctness issues with constructing FormData from a form element.

    15.2.0release notes

  • Fixed validation logic for range inputs.

    15.2.0release notes

  • Reflected properties are no longer affected by overwriting el.getAttributeNS() or el.setAttributeNS().

    15.2.0release notes

  • XML parsing errors now include the filename instead of using "undefined".

    15.2.0release notes

  • The on<event> properties now properly track their related attributes for SVG elements.

    15.1.1release notes

  • The style property now properly tracks its related attribute for SVG elements.

    15.1.1release notes

  • XMLHttpRequest no longer unnecessarily reserializes content-type request headers.

    15.1.1release notes

  • XMLHttpRequest now correctly merges preflight and response headers.

    15.1.1release notes

  • Fixed event path iteration in shadow DOM cases to follow specification fixes.

    15.1.0release notes

  • form.elements now excludes input elements with type=image.

    15.1.0release notes

  • pattern="" form control validation now applies the regular expression to the whole string.

    15.1.0release notes

  • Fixed synchronous XMLHttpRequest behavior on the newly-released Node.js v12.

    15.1.0release notes

jsdom 1419 changes

Breaking changes 4

  • Attribute access now ignores attributes with namespaces, as required by the specification.

    14.1.0release notes

  • During document loading, the load event now targets the Document instead of the Window.

    14.1.0release notes

  • Styles no longer apply to documents without a browsing context, including styles containing @import rules.

    14.1.0release notes

  • Calling JSDOM.fragment() without arguments now creates an empty DocumentFragment instead of one containing the text node "undefined".

    14.0.0release notes

New APIs and options 5

  • The External class is now exposed as a property of window.

    14.1.0release notes

  • The input element now exposes a list property.

    14.1.0release notes

  • The datalist element now exposes an options property.

    14.1.0release notes

  • pageshow events now fire during document loading.

    14.1.0release notes

  • PageTransitionEvent was added.

    14.1.0release notes

Behavior and default changes 1

  • Anchor and area elements with an empty href can activate javascript URLs or fragments.

    14.1.0release notes

Fixes and other changes 9

  • Re-enabling a disabled element restores its activation behavior.

    14.1.0release notes

  • HTML fragment parsing through innerHTML and outerHTML is now spec-compliant.

    14.1.0release notes

  • HTML serialization no longer breaks after certain properties receive non-string values.

    14.1.0release notes

  • option elements now return correct label property values in edge cases.

    14.1.0release notes

  • The pretendToBeVisual option now propagates to child subframes as well as the main Window.

    14.1.0release notes

  • option elements now return correct value property values in edge cases.

    14.1.0release notes

  • Fixed a regression when calling element.blur() on a focused element.

    14.0.0release notes

  • Inserting link elements into documents without a browsing context no longer crashes, and resources are fetched only when browsing-context connected.

    14.0.0release notes

  • Template contents now use a separate browsing-context-less document, preventing resources from being fetched inside templates.

    14.0.0release notes

jsdom 1342 changes

Breaking changes 7

  • Events fired by jsdom now have isTrusted set to true.

    13.2.0release notes

  • XML documents now default to UTF-8 instead of windows-1252.

    13.2.0release notes

  • mediaElement.duration now defaults to NaN.

    13.1.0release notes

  • Radio button group names are now matched case-sensitively.

    13.1.0release notes

  • titleElement.text now returns child text content instead of titleElement.innerHTML.

    13.1.0release notes

  • Support for canvas-prebuilt was removed because canvas v2.x includes a built-in prebuilt version.

    13.0.0release notes

  • DOM tree modifications now prevent impossible trees from being created.

    13.0.0release notes

Security 1

  • getComputedStyle now throws a sensible exception for the wrong argument without exposing jsdom internals.

    13.2.0release notes

New APIs and options 13

  • Added support for MutationObserver.

    13.2.0release notes

  • Added navigator.mimeTypes, which is always empty.

    13.2.0release notes

  • Added navigator.plugins, which is always empty.

    13.2.0release notes

  • The progress element now exposes value, max, and position properties.

    13.2.0release notes

  • Added the outputEl.htmlFor property.

    13.1.0release notes

  • Added el.insertAdjacentElement().

    13.1.0release notes

  • Added el.insertAdjacentText().

    13.1.0release notes

  • Added the defaultValue property to output elements, including form reset behavior.

    13.1.0release notes

  • Added the type property to output elements, including form reset behavior.

    13.1.0release notes

  • Added the value property to output elements, including form reset behavior.

    13.1.0release notes

  • addEventListener() now supports the passive option.

    13.0.0release notes

  • The storageEvent.initStorageEvent() method was added.

    13.0.0release notes

  • The relList property was added to <a>, <area>, and <link> elements.

    13.0.0release notes

Performance 1

  • Parsing large text nodes is faster, particularly for large inline style or script elements.

    13.1.0release notes

Behavior and default changes 2

Fixes and other changes 18

  • Nested fieldsets now receive correct disabled-state handling.

    13.2.0release notes

  • DOMParser-created documents now have readyState set to complete.

    13.2.0release notes

  • Summary elements are now focusable.

    13.2.0release notes

  • Clicking summary elements now toggles their parent details element.

    13.2.0release notes

  • XML document DOCTYPE parsing now preserves custom name values.

    13.2.0release notes

  • XML documents loaded in frames and iframes no longer error.

    13.2.0release notes

  • Bubbling click events now activate behavior correctly, including submitting forms from child clicks.

    13.1.0release notes

  • Fixed document.title in SVG documents.

    13.1.0release notes

  • Fixed the value of Element.prototype[Symbol.unscopables].

    13.1.0release notes

  • focus and blur events are now composed.

    13.1.0release notes

  • Reset buttons and inputs now actually perform a form reset when clicked.

    13.1.0release notes

  • node.isConnected now correctly reports nodes inside a shadow tree as connected.

    13.1.0release notes

  • Fixed el.setCustomValidity() for output and fieldset elements.

    13.1.0release notes

  • Fixed the style property on a and area elements.

    13.1.0release notes

  • Textareas now properly account for changes to child CDATA section nodes.

    13.1.0release notes

  • XML parsing now ignores text outside the root element instead of treating it as an error.

    13.1.0release notes

  • Fixed XML serialization for elements with unknown prefixes.

    13.1.0release notes

  • XMLHttpRequest against nonexistent file URLs now produces a network error instead of crashing.

    13.1.0release notes

jsdom 1227 changes

Breaking changes 6

  • Errors are no longer swallowed when the canvas or canvas-prebuilt packages are installed but fail to load.

    12.2.0release notes

  • input and change events for input elements are now trusted and uncancelable.

    12.1.0release notes

  • XML parsing now conforms more closely to specifications, rejecting some ill-formed documents and handling additional constructs correctly.

    12.1.0release notes

  • CSS selection APIs now throw an error for invalid selectors even when used on empty nodes.

    12.0.0release notes

  • jsdom now requires Node.js v8.

    12.0.0release notes

  • The old jsdom API was removed because the new API now provides all required capabilities.

    12.0.0release notes

New APIs and options 12

  • Added the element.toggleAttribute() method.

    12.2.0release notes

  • Added support for shadow roots, slots, composed events, and related shadow DOM functionality.

    12.2.0release notes

  • dom.runVMScript() now accepts an options parameter for configuring script execution.

    12.1.0release notes

  • Custom resource loader fetch() implementations can now see which element initiated the fetch.

    12.1.0release notes

  • Added the fieldsetEl.elements property for accessing elements associated with a fieldset.

    12.1.0release notes

  • Added the fieldsetEl.type property.

    12.1.0release notes

  • Added the countReset() method to console.

    12.0.0release notes

  • Added the dir() method to console.

    12.0.0release notes

  • Added the dirxml() method to console.

    12.0.0release notes

  • Added htmlElement.draggable.

    12.0.0release notes

  • Added the InputEvent class.

    12.0.0release notes

  • Added window.status.

    12.0.0release notes

Behavior and default changes 1

  • window.name now defaults to the empty string instead of "nodejs", per spec.

    12.0.0release notes

Fixes and other changes 8

  • formElement.form now also checks the form="" attribute instead of only the closest ancestor form element.

    12.2.0release notes

  • Fixed XMLHttpRequest sometimes sending an empty request body after a preflight request.

    12.2.0release notes

  • Scripts with the async attribute no longer execute before preceding synchronous scripts, reducing a regression from v12.0.0.

    12.1.0release notes

  • CSS selection APIs no longer sometimes return outdated results, especially for state pseudo-class selectors like :checked.

    12.0.0release notes

  • select.selectedOptions no longer sometimes returns outdated results.

    12.0.0release notes

  • Cloning textarea elements now preserves their values.

    12.0.0release notes

  • The default User-Agent now says "unknown OS" instead of "undefined" when jsdom is used in web browsers.

    12.0.0release notes

  • window.frameElement now returns an actual HTMLElement instance instead of a jsdom internal class.

    12.0.0release notes

jsdom 11174 changes

Breaking changes 23

  • hashchange events no longer bubble, matching the updated specification.

    11.12.0release notes

  • popstate events no longer bubble, matching the updated specification.

    11.12.0release notes

  • Style and script evaluation better follows the specification; scripts inserted by innerHTML are no longer evaluated.

    11.6.2release notes

  • data: URL parsing no longer includes fragment portions.

    11.6.0release notes

  • Various APIs now use ASCII lowercasing instead of Unicode lowercasing for element and attribute names.

    11.6.0release notes

  • Removed probablySupportsContext() from HTMLCanvasElement per specification updates.

    11.6.0release notes

  • Removed setContext() from HTMLCanvasElement per specification updates.

    11.6.0release notes

  • Removed the nonstandard window.createPopup() method.

    11.6.0release notes

  • Removed the nonstandard window.scrollLeft property.

    11.6.0release notes

  • Removed the nonstandard window.scrollTop property.

    11.6.0release notes

  • Stopped XML parsing from interpreting HTML character entities.

    11.4.0release notes

  • document.getElementsByName() now returns a NodeList instead of an HTMLCollection.

    11.3.0release notes

  • Disabled labeled controls no longer receive activation behavior when label.click() is called.

    11.3.0release notes

  • UIEvent now only allows initialization with Window objects for its view property.

    11.3.0release notes

  • blob.close() and blob.isClosed() were removed.

    11.0.0release notes

  • Disconnected forms no longer submit.

    11.0.0release notes

  • Location info objects returned by nodeLocation() now have a different structure after the parse5 upgrade.

    11.0.0release notes

  • The old API no longer accepts custom parsers; parse5 and sax are always used for HTML and XML.

    11.0.0release notes

  • Invalid qualified names now throw InvalidCharacterError instead of NamespaceError DOMExceptions.

    11.0.0release notes

  • Event handler attributes require runScripts: "dangerously"; event handler properties now work with any runScripts value.

    11.0.0release notes

  • Remaining non-spec toString() methods on various prototypes were removed.

    11.0.0release notes

  • Methods accepting web platform objects now type-check arguments and throw TypeError for invalid values.

    11.0.0release notes

  • getAllResponseHeaders() lowercases response headers and separates values with comma-space.

    11.0.0release notes

New APIs and options 64

  • Added element.closest for finding the nearest matching ancestor element.

    11.12.0release notes

  • Added storageQuota to control how much data in-memory storage can contain.

    11.12.0release notes

  • Added StorageEvent support for storage-related event handling.

    11.12.0release notes

  • Added in-memory localStorage support for browser-like storage access.

    11.12.0release notes

  • Added in-memory sessionStorage support for browser-like storage access.

    11.12.0release notes

  • Added el.labels for form control elements.

    11.11.0release notes

  • Added label.control.

    11.11.0release notes

  • Added the node.getRootNode() API.

    11.11.0release notes

  • Added event.returnValue.

    11.10.0release notes

  • Added event.srcElement.

    11.10.0release notes

  • Added node.lookupPrefix().

    11.9.0release notes

  • Added the full constraint validation API to eight HTML element interfaces.

    11.8.0release notes

  • Added getElementById() to DocumentFragment, enabling ID lookup within fragments.

    11.8.0release notes

  • FileReader gains readAsBinaryString(), which was added back to the specification.

    11.7.0release notes

  • Added support for the endings option to the Blob constructor.

    11.6.0release notes

  • Added window.devicePixelRatio.

    11.6.0release notes

  • Added a setter for HTMLInputElement.files.

    11.6.0release notes

  • Added support for the public HTMLMeterElement API except meterEl.labels.

    11.6.0release notes

  • Added getModifierState() to KeyboardEvent.

    11.6.0release notes

  • Added getModifierState() to MouseEvent.

    11.6.0release notes

  • Added window.performance with High Resolution Time basics.

    11.6.0release notes

  • Added performance.now().

    11.6.0release notes

  • Added performance.timeOrigin.

    11.6.0release notes

  • Added performance.toJSON().

    11.6.0release notes

  • Added screen.availHeight, and made all screen properties getters.

    11.6.0release notes

  • Added screen.availWidth, and made all screen properties getters.

    11.6.0release notes

  • Added screen.colorDepth, and made all screen properties getters.

    11.6.0release notes

  • Added screen.pixelDepth, and made all screen properties getters.

    11.6.0release notes

  • Added a fully functioning WebSocket implementation.

    11.6.0release notes

  • Added the locationbar property to Window.

    11.6.0release notes

  • Added the menubar property to Window.

    11.6.0release notes

  • Added the personalbar property to Window.

    11.6.0release notes

  • Added the scrollbars property to Window.

    11.6.0release notes

  • Added the statusbar property to Window.

    11.6.0release notes

  • Added the toolbar property to Window.

    11.6.0release notes

  • Added AbortController support.

    11.5.1release notes

  • Added AbortSignal support.

    11.5.1release notes

  • Added after() to DocumentType, Element, and CharacterData.

    11.4.0release notes

  • Added append() to Document, DocumentFragment, and Element.

    11.4.0release notes

  • Added before() to DocumentType, Element, and CharacterData.

    11.4.0release notes

  • Added node.isConnected.

    11.4.0release notes

  • Added node.isSameNode().

    11.4.0release notes

  • Added prepend() to Document, DocumentFragment, and Element.

    11.4.0release notes

  • Added an option controlling requestAnimationFrame(), cancelAnimationFrame(), document.hidden, and document.visibilityState.

    11.4.0release notes

  • Added replaceWith() to DocumentType, Element, and CharacterData.

    11.4.0release notes

  • Added rudimentary SVG element classes, making SVG elements instances of SVGElement; only SVGSVGElement is concretely implemented for svg.

    11.4.0release notes

  • Added the CompositionEvent class.

    11.3.0release notes

  • Added a <details> element implementation.

    11.3.0release notes

  • Added a stub <marquee> element implementation.

    11.3.0release notes

  • Added a stub <picture> element implementation.

    11.3.0release notes

  • Added a setter for table.caption.

    11.3.0release notes

  • Added the table.createTBody() method.

    11.3.0release notes

  • Added a setter for table.tFoot.

    11.3.0release notes

  • Added a setter for table.tHead.

    11.3.0release notes

  • Added the WheelEvent class.

    11.3.0release notes

  • Added a no-op document.captureEvents() API for compatibility.

    11.2.0release notes

  • Added a no-op document.clear() API for compatibility.

    11.2.0release notes

  • Added a no-op document.releaseEvents() API for compatibility.

    11.2.0release notes

  • Added support for accessing element data attributes through dataset.

    11.2.0release notes

  • Select elements now support indexed and named access, plus item() and namedItem().

    11.2.0release notes

  • Added a no-op AddSearchProvider() API for compatibility.

    11.2.0release notes

  • Added a no-op IsSearchProviderInstalled() API for compatibility.

    11.2.0release notes

  • Updated whatwg-url brought along URLSearchParams.

    11.1.0release notes

  • Event handler properties such as oneventname were added to relevant prototypes and now follow the specification.

    11.0.0release notes

Performance 4

  • Parsing HTML documents with large numbers of sibling elements is faster.

    11.6.0release notes

  • Significantly sped up synchronous XMLHttpRequest.

    11.3.0release notes

  • getComputedStyle() is significantly faster because unsupported selectors were removed from the default style sheet.

    11.0.0release notes

  • HTMLCollection performance was significantly improved, including parsing performance for large documents.

    11.0.0release notes

Behavior and default changes 14

  • Selector matching now uses nwsapi, bringing fixes, performance improvements, and additional selector support.

    11.11.0release notes

  • DOMTokenList.replace() now returns a boolean, matching the recent specification addition.

    11.7.0release notes

  • MIME type parsing was improved throughout jsdom using the new whatwg-mimetype package.

    11.7.0release notes

  • All window.screen properties are now getters.

    11.6.0release notes

  • Added XML CDATA section parsing, including through domParser.parseFromString().

    11.4.0release notes

  • Converted DOMTokenList to proxies for improved specification compliance and liveness.

    11.3.0release notes

  • FileList now supports indexed property access such as fileList[i].

    11.2.0release notes

  • select.options is now an HTMLOptionsCollection instance.

    11.2.0release notes

  • Updated URL behavior to include origin serialization changes.

    11.1.0release notes

  • Added javascript: URL navigation via window.location, evaluating side effects without actually navigating.

    11.1.0release notes

  • event.initEvent() and related methods now provide additional defaults.

    11.0.0release notes

  • Location properties are now own instance properties and are non-configurable.

    11.0.0release notes

  • tokenList.replace() now follows updated edge-case behavior.

    11.0.0release notes

  • XMLHttpRequest now permits redirects after a CORS preflight and changes username/password CORS treatment.

    11.0.0release notes

Fixes and other changes 69

  • The old API no longer throws on invalid file-path input such as typical HTML strings.

    11.12.0release notes

  • Fixed the contentType of Documents created through iframes.

    11.11.0release notes

  • Fixed the contentType of Documents created through document.implementation.createDocument().

    11.11.0release notes

  • Upgraded cssstyle, bringing fixes to the CSS parser and object model.

    11.11.0release notes

  • node.normalize() no longer modifies non-Text nodes.

    11.11.0release notes

  • Fixed the origin of Documents created through document.implementation.createDocument().

    11.11.0release notes

  • sourceEl.srcset now returns the srcset attribute value instead of the cite attribute value.

    11.11.0release notes

  • Fixed the interaction of URL's href and searchParams properties.

    11.11.0release notes

  • XMLHttpRequest now correctly sets the User-Agent header, including on CORS preflight requests.

    11.10.0release notes

  • JPEG quality is now passed through correctly instead of always being passed as zero to node-canvas.

    11.9.0release notes

  • Document cloning now preserves all appropriate state and avoids adding an extra document type node.

    11.9.0release notes

  • Fixed various edge cases in the nodeValue property.

    11.9.0release notes

  • Fixed various edge cases in the textContent property.

    11.9.0release notes

  • AbortSignal abort events now have isTrusted set to true.

    11.7.0release notes

  • data: URL parsing was improved throughout jsdom using the new data-urls package.

    11.7.0release notes

  • Event handlers are now own properties of each Window rather than properties on Window.prototype.

    11.7.0release notes

  • Removing an img element's empty src attribute no longer sometimes raises an exception.

    11.7.0release notes

  • Argument conversions in XMLHttpRequest.open() were corrected.

    11.7.0release notes

  • Restores parsing jsdomError events omitted for style sheet text containing spaces.

    11.6.2release notes

  • Fixed style elements whose sheet property was sometimes null when it should not be.

    11.6.1release notes

  • Fixed style elements retaining a CSSStyleSheet after being removed from the document.

    11.6.1release notes

  • Documents created via new Document() now use UTF-8 encoding.

    11.6.0release notes

  • Various events now fire with correct default values, including MouseEvent properties from element.click().

    11.6.0release notes

  • Event handler properties now behave correctly when assigned non-callable objects.

    11.6.0release notes

  • hashchange events during fragment navigation are now trusted events.

    11.6.0release notes

  • popstate events during fragment navigation are now trusted events.

    11.6.0release notes

  • URL-accepting properties now perform scalar value string conversion and URL resolution correctly.

    11.6.0release notes

  • Fixed validation for file inputs and added validation for more input types.

    11.5.1release notes

  • Fixed xhr.abort() so it clears any set headers.

    11.4.0release notes

  • Fixed radioButton.click() to fire appropriate input and change events.

    11.4.0release notes

  • Fixed line number reporting in exception stack traces for script elements when includeNodeLocations is set.

    11.4.0release notes

  • Implemented appropriate input.value getter and setter behavior for input type=file.

    11.4.0release notes

  • Improved spec compliance so named and indexed properties on element.attributes are retrieved properly.

    11.4.0release notes

  • Fixed SVG selector behavior inside template contents DocumentFragments, including fragments created by JSDOM.fragment().

    11.4.0release notes

  • Fixed SVG selector behavior inside template contents DocumentFragments, including fragments created by JSDOM.fragment().

    11.4.0release notes

  • Responses are now always decoded as UTF-8 when responseType is set to json.

    11.4.0release notes

  • Fixed CORS header handling, especially for preflights and Access-Control-Allow-Headers.

    11.4.0release notes

  • Made DOMException spec-compliant, including its constructor signature.

    11.3.0release notes

  • Fixed FocusEvent creation, which had regressed in the previous release.

    11.3.0release notes

  • The element interface for <td> and <th> is now HTMLTableCellElement with improved specification compliance.

    11.3.0release notes

  • Fixed interactions between inline event handlers and other event listeners.

    11.3.0release notes

  • Updated keyboardEvent.initKeyboardEvent() to match the latest specifications.

    11.3.0release notes

  • Updated mouseEvent.initiMouseEvent() to match the latest specifications.

    11.3.0release notes

  • Fixed the behavior of table.createCaption().

    11.3.0release notes

  • Fixed the behavior of table.deleteRow().

    11.3.0release notes

  • Fixed the behavior of the table.rows getter.

    11.3.0release notes

  • Fixed the behavior of tr.deleteCall().

    11.3.0release notes

  • Fixed the behavior of tr.rowIndex.

    11.3.0release notes

  • Updated uiEvent.initUIEvent() to match the latest specifications.

    11.3.0release notes

  • Improved event handlers, abort(), and network error behavior.

    11.2.0release notes

  • Improved behavior around navigating to URL fragments.

    11.2.0release notes

  • Class matching is now ASCII case-insensitive instead of using JavaScript toLowerCase().

    11.2.0release notes

  • Indexed, id, and name property retrieval is now spec-compliant and live.

    11.2.0release notes

  • Added active checks to prevent reentrancy and improved edge-case spec compliance.

    11.2.0release notes

  • Indexed property retrieval is now spec-compliant and live.

    11.2.0release notes

  • Added active checks to prevent reentrancy.

    11.2.0release notes

  • Elements with id="undefined" no longer shadow the global undefined property.

    11.2.0release notes

  • Improved event handlers, abort(), and network error behavior.

    11.2.0release notes

  • Fixed javascript: URL loading for iframes with proper percent-decoding and error reporting.

    11.1.0release notes

  • Timers no longer start after a window is closed, avoiding errors from unusable objects.

    11.1.0release notes

  • Fixed corrupted XMLHttpRequest responses larger than 1 MiB.

    11.1.0release notes

  • fileReader.abort() now properly terminates ongoing reads.

    11.0.0release notes

  • Upgrading parse5 brings correctness improvements to HTML parsing.

    11.0.0release notes

  • input.select() no longer throws for input types where selection does not apply.

    11.0.0release notes

  • Symbol.toStringTag properties are now non-writable and non-enumerable.

    11.0.0release notes

  • tokenList.remove() now works when its DOMTokenList corresponds to a nonexistent attribute.

    11.0.0release notes

  • xhr.overrideMimeType() no longer throws for invalid input.

    11.0.0release notes

  • xhr.send() now accepts array buffer views as well as ArrayBuffers.

    11.0.0release notes

  • Non-GET requests to data: URLs now work with XMLHttpRequest.

    11.0.0release notes

jsdom 1021 changes

Breaking changes 6

  • Removed prototype toString() methods that returned class-like strings to imitate Symbol.toStringTag behavior.

    10.1.0release notes

  • Setting htmlElement.dir now restricts values to ltr, rtl, or auto.

    10.0.0release notes

  • img elements no longer fire load events unless their image data is actually loaded.

    10.0.0release notes

  • The API for creating and manipulating jsdoms was completely overhauled with more intuitive usage and better defaults.

    10.0.0release notes

  • The omitJsdomErrors option was renamed to omitJSDOMErrors.

    10.0.0release notes

  • Node.js v4 and v5 are no longer supported; Node.js v6 or newer is required.

    10.0.0release notes

Security 1

  • Origin checking is corrected, so callers do not always need to pass an origin of "*".

    10.0.0release notes

Deprecations 1

  • The old API remains available through old-api.js but will not receive new features.

    10.0.0release notes

New APIs and options 2

Performance 1

  • XMLHttpRequest now pre-allocates and exponentially grows a 1 MiB buffer to avoid frequent allocation and concatenation.

    10.1.0release notes

Behavior and default changes 1

  • Added value sanitization for password, search, tel, text, color, email, and url input types.

    10.1.0release notes

Fixes and other changes 9

  • Properties intended to return the same object now consistently preserve object identity.

    10.1.0release notes

  • Fixed inheritance of the resources option into iframes.

    10.1.0release notes

  • Fixed inheritance of the runScripts option into iframes.

    10.1.0release notes

  • Added Symbol.toStringTag to all web platform classes, making Object.prototype.toString.call() work as expected on jsdom objects.

    10.1.0release notes

  • Fixed an uncaught exception when xhr.abort() was called during a readystatechange event.

    10.1.0release notes

  • The <a> and <area> APIs now match the latest specification, with several bugs fixed.

    10.0.0release notes

  • Setting innerHTML to an empty string now updates the document instead of doing nothing.

    10.0.0release notes

  • The error message is improved when xhr.open receives too few arguments.

    10.0.0release notes

  • Approved preflight headers are now forwarded to the actual request.

    10.0.0release notes

jsdom 9134 changes

Breaking changes 22

  • HTML elements now expose offsetParent, always returning null.

    9.11.0release notes

  • getClientRects() now returns an empty array instead of a dummy bounding box.

    9.10.0release notes

  • Named access now returns the first matching element encountered instead of the last.

    9.9.0release notes

  • Moved file.lastModified from Blob to File.

    9.8.0release notes

  • Calling stopImmediatePropagation on an already-dispatched event now follows the latest DOM Standard changes.

    9.6.0release notes

  • Calling stopPropagation on an already-dispatched event now follows the latest DOM Standard changes.

    9.6.0release notes

  • The default file.lastModified value is now the current time instead of 0.

    9.6.0release notes

  • Now returns HTMLCollection instead of NodeList and follows the spec algorithms more exactly.

    9.5.0release notes

  • Now returns HTMLCollection instead of NodeList and follows the spec algorithms more exactly.

    9.5.0release notes

  • The minimum tough-cookie version was upgraded to protect installations against a security advisory.

    9.4.2release notes

  • Disabled-element semantics now more closely match the specification, especially for descendants of fieldset disabled.

    9.4.0release notes

  • XML parsing now rejects ill-formed XHTML markup when parsingMode is set to xml.

    9.4.0release notes

  • Constructors exposed as globals on the jsdom window are now non-enumerable.

    9.4.0release notes

  • URL setters now ignore invalid input instead of throwing.

    9.2.1release notes

  • Makes appName more browser-like instead of based on Node.js information.

    9.1.0release notes

  • Removes the noUI navigator property.

    9.1.0release notes

  • Makes platform more browser-like instead of based on Node.js information.

    9.1.0release notes

  • Makes userAgent more browser-like instead of based on Node.js information.

    9.1.0release notes

  • Makes version more browser-like instead of based on Node.js information.

    9.1.0release notes

  • tabIndex now defaults to 0 for focusable elements.

    9.1.0release notes

  • Support for mutation events was removed; mutation observers are not yet supported.

    9.0.0release notes

  • XMLHttpRequest statusText now defaults to an empty string instead of OK.

    9.0.0release notes

New APIs and options 43

  • Supports canvas-prebuilt as an alternative package to canvas.

    9.12.0release notes

  • Adds the Option named constructor.

    9.12.0release notes

  • HTML elements now expose offsetHeight, always returning 0.

    9.11.0release notes

  • HTML elements now expose offsetLeft, always returning 0.

    9.11.0release notes

  • HTML elements now expose offsetTop, always returning 0.

    9.11.0release notes

  • HTML elements now expose offsetWidth, always returning 0.

    9.11.0release notes

  • Elements now expose clientHeight, returning 0.

    9.10.0release notes

  • Elements now expose clientLeft, returning 0.

    9.10.0release notes

  • Elements now expose clientTop, returning 0.

    9.10.0release notes

  • Elements now expose clientWidth, returning 0.

    9.10.0release notes

  • Events now expose the cancelBubble property.

    9.10.0release notes

  • NodeList now supports iteration and key/value/entry access methods.

    9.10.0release notes

  • Elements now expose scrollHeight, returning 0.

    9.10.0release notes

  • Elements now expose scrollWidth, returning 0.

    9.10.0release notes

  • Added CDATASection nodes, including document.createCDATASection.

    9.9.0release notes

  • Added a setter for document.body.

    9.9.0release notes

  • Added node.wholeText.

    9.9.0release notes

  • Added the blob.isClosed property.

    9.8.0release notes

  • Added document.hasFocus() for checking whether the document currently has focus.

    9.7.0release notes

  • addEventListener and removeEventListener now support EventListenerOptions, including once and capture.

    9.7.0release notes

  • HTMLCollection now supports for-of iteration.

    9.6.0release notes

  • Added document.embeds.

    9.5.0release notes

  • Added document.plugins.

    9.5.0release notes

  • Added document.scripts.

    9.5.0release notes

  • Custom request agents can now be passed through the agent option.

    9.4.0release notes

  • Custom request agent classes can now be passed through the agentClass option.

    9.4.0release notes

  • Adds a spec-compliant DOMParser API, except parsed documents always use about:blank instead of the creating document's URL.

    9.4.0release notes

  • Adds window.frameElement, but without appropriate cross-origin security checks.

    9.4.0release notes

  • Adds the public jsdom.evalVMScript API for evaluating VM scripts.

    9.4.0release notes

  • Added the Audio named constructor.

    9.3.0release notes

  • Added an API to override a window's existing URL.

    9.2.0release notes

  • Adds the FocusEvent class and fires focus and blur events appropriately.

    9.1.0release notes

  • Adds the appCodeName navigator property.

    9.1.0release notes

  • Adds the javaEnabled() navigator method.

    9.1.0release notes

  • Adds the language navigator property.

    9.1.0release notes

  • Adds the languages navigator property.

    9.1.0release notes

  • Adds the onLine navigator property.

    9.1.0release notes

  • Adds the product navigator property.

    9.1.0release notes

  • Adds the productSub navigator property.

    9.1.0release notes

  • Adds the vendor navigator property.

    9.1.0release notes

  • Adds the vendorSub navigator property.

    9.1.0release notes

  • Added DOMTokenList.prototype.replace.

    9.0.0release notes

  • XMLHttpRequest gained a responseURL property.

    9.0.0release notes

Performance 1

Behavior and default changes 3

  • Adds rudimentary processing of XML <!ENTITY declarations.

    9.4.0release notes

  • XMLHttpRequest methods, headers, and header values now use the ByteString algorithm.

    9.0.0release notes

  • Argument validation was removed from DOMTokenList.prototype.contains to match the latest specification.

    9.0.0release notes

Fixes and other changes 65

  • Works correctly when jsdom is browserified.

    9.12.0release notes

  • Works correctly when jsdom is browserified.

    9.12.0release notes

  • Preserves URL fragments across redirects.

    9.12.0release notes

  • Makes optionEl.text more spec-compliant.

    9.12.0release notes

  • Makes optionEl.value more spec-compliant.

    9.12.0release notes

  • Always returns a positive integer instead of 0 on the first call.

    9.12.0release notes

  • Always returns a positive integer instead of 0 on the first call.

    9.12.0release notes

  • Actually stops immediate propagation instead of only stopping propagation.

    9.12.0release notes

  • Edge cases in type conversions for method arguments and setters across implemented web platform APIs were fixed.

    9.11.0release notes

  • Blob, File, and FileReader behavior now better matches the File API specification.

    9.10.0release notes

  • Progress events now match recent specification changes and test updates.

    9.10.0release notes

  • Readystatechange events now match recent specification changes and test updates.

    9.10.0release notes

  • Removed use of array.includes to restore compatibility with Node.js v4.

    9.9.1release notes

  • Fixed removal of event listeners registered with the once option.

    9.9.0release notes

  • document.body now acts more correctly in various edge cases.

    9.9.0release notes

  • Added document.embeds, which had been mistakenly omitted from 9.5.0.

    9.9.0release notes

  • Added document.plugsin, which had been mistakenly omitted from 9.5.0.

    9.9.0release notes

  • Added document.scripts, which had been mistakenly omitted from 9.5.0.

    9.9.0release notes

  • document.title now acts more correctly in various edge cases.

    9.9.0release notes

  • Now works with null or document parent nodes for afterbegin and beforeend insertion positions.

    9.9.0release notes

  • The not implemented virtual console message now occurs only when form submission is not canceled.

    9.9.0release notes

  • Fixed POSTing JSON with Authorization to a CORS endpoint.

    9.9.0release notes

  • Fixed syntax errors so jsdom can run correctly on Node.js v4.

    9.8.3release notes

  • Now splits only on ASCII whitespace instead of all Unicode whitespace.

    9.8.2release notes

  • Now splits only on ASCII whitespace instead of all Unicode whitespace.

    9.8.2release notes

  • Fixed an error when passing no class names to getElementsByClassName, including empty or whitespace-only strings.

    9.8.1release notes

  • file.lastModified now defaults to the File object's creation time.

    9.8.0release notes

  • Non-HTML elements named "iframe" are no longer incorrectly focusable.

    9.8.0release notes

  • Fixed a performance regression when modifying the DOM, especially during initial parsing of documents with many elements.

    9.7.1release notes

  • Focusing something inside an iframe now also focuses the iframe itself.

    9.7.0release notes

  • Cloning Attrs now correctly preserves the namespace prefix.

    9.6.0release notes

  • XMLHttpRequest progress events now have ordering closer to the specification and browsers.

    9.6.0release notes

  • Corrected console.groupCollapse to console.groupCollapsed and updated the virtual console.

    9.5.0release notes

  • Various HTMLCollection-returning getters are now more spec-compliant.

    9.5.0release notes

  • Now respects the agent and agentClass options in addition to agentOptions.

    9.5.0release notes

  • Fixed error events from failed resource loads going missing since v9.4.3.

    9.4.5release notes

  • Removed leftover console.log from the error handling path introduced in v9.4.3.

    9.4.4release notes

  • Fixed spurious jsdomError events when closing a window due to aborted resource loads.

    9.4.3release notes

  • Inline event handlers returning non-boolean values no longer erroneously cancel events.

    9.4.2release notes

  • Cloned input elements now copy their value, checkedness, and dirty flags correctly.

    9.4.1release notes

  • Iframe documents now receive the parent document's URL as their referrer.

    9.4.0release notes

  • External images specified with relative URLs now load when the canvas npm package is installed.

    9.4.0release notes

  • input.checked now has the correct value inside checkbox click events.

    9.4.0release notes

  • Stylesheet link elements now load when their href attributes change while in a document.

    9.4.0release notes

  • Script elements now load when they gain a src attribute while in a document.

    9.4.0release notes

  • Window named properties now correctly resolve iframe elements or iframe windows for name versus id scenarios.

    9.4.0release notes

  • Canceling clicks on submit buttons and labels now prevents form submission and re-dispatches to the relevant form control.

    9.3.0release notes

  • The Image named constructor now follows the specification more closely, including matching HTMLImageElement.prototype.

    9.3.0release notes

  • The tabIndex setter no longer causes errors after regressing in 9.1.0.

    9.3.0release notes

  • Unhandled errors thrown in XHR event handlers are now redirected to the virtual console instead of being swallowed.

    9.3.0release notes

  • Returns the attribute value instead of an empty string for unparseable URLs.

    9.2.1release notes

  • External resources now receive the document's URL as referrer instead of its base URL.

    9.2.1release notes

  • Returns null instead of throwing for elements that do not allow selection.

    9.2.1release notes

  • Returns null instead of throwing for elements that do not allow selection.

    9.2.1release notes

  • Returns null instead of throwing for elements that do not allow selection.

    9.2.1release notes

  • Returns null instead of undefined for out-of-bounds indices.

    9.2.1release notes

  • The URL constructor now correctly throws for unparseable URLs.

    9.2.1release notes

  • Error events are no longer suppressed after the first event.

    9.2.1release notes

  • The proxy option is now applied to all requests.

    9.2.0release notes

  • Fixed response header filtering for cross-origin requests and ProgressEvents fired from those XHRs.

    9.2.0release notes

  • Only focusable elements can be focused.

    9.1.0release notes

  • Resolves formEl.action relative to the document URL, or uses that URL when the attribute is missing or empty.

    9.1.0release notes

  • Invalid CSS no longer crashes parsing and instead emits a jsdomError to the virtual console.

    9.1.0release notes

  • window.close() now correctly clears event listeners on the document.

    9.1.0release notes

  • Fixed validation of the Blob constructor's type option.

    9.0.0release notes

jsdom 866 changes

Breaking changes 19

  • Removed the nonstandard Internet Explorer-only property.

    8.5.0release notes

  • Removed the unimplemented property, which previously crashed when used.

    8.5.0release notes

  • Clicks cannot begin while another click is in progress.

    8.2.0release notes

  • XHTML frames and iframes are parsed as XML instead of HTML.

    8.2.0release notes

  • Created documents now use XML parsing mode, affecting several DOM APIs.

    8.1.0release notes

  • relatedNode is now the new Attr object instead of the Node.

    8.1.0release notes

  • Changed DOMTokenList.toString serialization slightly to match recent spec changes.

    8.1.0release notes

  • Named properties are now lowercase except for specified XML and non-HTML edge cases.

    8.1.0release notes

  • Named properties are now non-enumerable.

    8.1.0release notes

  • tc.headers is now a DOMTokenList reflecting the headers attribute instead of a string.

    8.1.0release notes

  • All jsdom installs now benefit from cssstyle's improved margin parsing and CSSOM behavior.

    8.0.3release notes

  • All jsdom installs now benefit from cssstyle's improved padding parsing and CSSOM behavior.

    8.0.3release notes

  • Removed this minor unimplemented or no-longer-standard DOM Level 3 API.

    8.0.0release notes

  • Removed this minor unimplemented or no-longer-standard DOM Level 3 API.

    8.0.0release notes

  • Removed this minor unimplemented or no-longer-standard DOM Level 3 API.

    8.0.0release notes

  • Nodes are adopted during insertion instead of causing WrongDocumentError exceptions.

    8.0.0release notes

  • Now returns numeric IDs, accepts string arguments to eval, and passes extra arguments after the first two.

    8.0.0release notes

  • Now returns numeric IDs, accepts string arguments to eval, and passes extra arguments after the first two.

    8.0.0release notes

  • Removed this minor unimplemented or no-longer-standard DOM Level 3 API.

    8.0.0release notes

Deprecations 1

  • The proprietary navigator.noUI is superseded by the Page Visibility API and will be removed in v9.0.0.

    8.3.0release notes

New APIs and options 14

  • Added the TreeWalker class and document.createTreeWalker implementation for traversing document trees.

    8.4.0release notes

  • Adds canvasContext.createPattern when the canvas npm package is installed.

    8.3.0release notes

  • Images can be drawn onto canvases when the canvas npm package is installed.

    8.3.0release notes

  • Adds canvasContext.toBlob when the canvas npm package is installed.

    8.3.0release notes

  • Adds the Page Visibility API's document.hidden property, which always returns true.

    8.3.0release notes

  • Adds the Page Visibility API's document.visibilityState property, which always returns prerender.

    8.3.0release notes

  • Adds the document.lastModified property.

    8.2.0release notes

  • Adds the document.origin property.

    8.2.0release notes

  • A top-level strictSSL option governs all requests made by jsdom.

    8.2.0release notes

  • Added a setter for element.classList that forwards to element.classList.value.

    8.1.0release notes

  • Added element.getAttributeNames() for enumerating an element's attribute names.

    8.1.0release notes

  • Added Node.prototype.adoptNode to adopt nodes across documents.

    8.0.0release notes

  • Added a stub matching the existing getBoundingClientRect stub.

    8.0.0release notes

  • Added Element.prototype.insertAdjacentHTML for inserting HTML adjacent to an element.

    8.0.0release notes

Performance 1

  • Parsing speed should improve because URLs are no longer parsed and resolved during parsing.

    8.0.0release notes

Behavior and default changes 5

  • Decodes URL or file bytes using Content-Type, meta charset, or BOM signals, matching browser encoding behavior.

    8.5.0release notes

  • Images load and decode when the canvas package is installed and external img resources are fetched, updating dimensions and firing load or error events.

    8.3.0release notes

  • XMLHttpRequest gains preliminary CORS support.

    8.2.0release notes

  • Labels now proxy clicks to their labeled form elements.

    8.1.0release notes

  • Many properties are now available, with more spec-compliant type conversions and attribute/property reflections; implementation details are hidden behind a single symbol.

    8.0.0release notes

Fixes and other changes 26

  • Accounts for Content-Type, meta charset, and BOM signals when fetching resources through browser-like mechanisms.

    8.5.0release notes

  • Fixed setting proxied inline event handlers for documents without a browsing context.

    8.5.0release notes

  • Setting selected on a multi-select no longer clears all other selectedness.

    8.4.1release notes

  • Fixed issues with generated files in the published package that impacted webpack users.

    8.4.0release notes

  • Fixed minor bugs in URL parsing and the URL API.

    8.4.0release notes

  • Fixed spurious attributes appearing on jsdom nodes when Object.prototype was modified.

    8.3.1release notes

  • Change events now fire appropriately for input clicks.

    8.2.0release notes

  • Input selection methods and properties now distinguish outright-selectable inputs from textual inputs with variable-length selection.

    8.2.0release notes

  • Input events now fire appropriately for input clicks.

    8.2.0release notes

  • Scripts execute only when their MIME type appears on the canonical JavaScript MIME type list.

    8.2.0release notes

  • The scriptEl.text getter and setter now follow the specification.

    8.2.0release notes

  • Corrected the constructor property, which previously incorrectly pointed to Window.

    8.1.0release notes

  • option.index no longer errors for options outside a select.

    8.1.0release notes

  • Can now replace an attribute node without changing its order in the attribute list.

    8.1.0release notes

  • Can now replace an attribute node without changing its order in the attribute list.

    8.1.0release notes

  • tc.cellIndex no longer errors for cells outside a table row.

    8.1.0release notes

  • tr.sectionRowIndex no longer errors for rows outside table sections.

    8.1.0release notes

  • Fixed the this value when passing an object with handleEvent() to addEventListener.

    8.0.4release notes

  • Fixed a typo that prevented HTMLOptionElement.prototype.label from working.

    8.0.3release notes

  • document.activeElement now falls back to the body element when no element is focused or the active element is removed.

    8.0.2release notes

  • Custom user agents now propagate to navigator.userAgent in frames and iframes.

    8.0.2release notes

  • Event handler callbacks now bind this to the event's current target.

    8.0.1release notes

  • Event objects are now always initialized unless created with document.createEvent, including events with an empty name.

    8.0.0release notes

  • Reimplemented according to the latest specs, improving URL resolution and navigation correctness for links and areas.

    8.0.0release notes

  • Iframes now load through the custom resource loader.

    8.0.0release notes

  • Fixed shorthand properties so component properties update and parsing works correctly.

    8.0.0release notes

jsdom 762 changes

Breaking changes 12

  • Attr now follows the latest specification, is no longer a Node subclass, and no longer has child text nodes.

    7.1.0release notes

  • CustomEvent now provides initCustomEvent for initialization.

    7.1.0release notes

  • initProgressEvent was replaced by initCustomEvent on CustomEvent.prototype.

    7.1.0release notes

  • Invalid selectors now throw SyntaxError DOMExceptions instead of Error instances.

    7.1.0release notes

  • Invalid selectors now throw SyntaxError DOMExceptions instead of Error instances.

    7.1.0release notes

  • Invalid selectors now throw SyntaxError DOMExceptions instead of Error instances.

    7.1.0release notes

  • The template content structure no longer includes an extra intermediate document fragment or child nodes.

    7.1.0release notes

  • document.implementation.createDocumentType now requires all three arguments.

    7.0.1release notes

  • Comparing any two doctypes no longer always returns true.

    7.0.1release notes

  • Creating a jsdom document with an invalid URL now throws an error.

    7.0.0release notes

  • Node.js 4.0 or later is now required to run jsdom.

    7.0.0release notes

  • omitJsdomErrors moved from virtual-console creation to the sendTo call.

    7.0.0release notes

New APIs and options 24

  • Adds support for text selection APIs on input and textarea elements.

    7.2.0release notes

  • Almost all supported Event subclasses now have constructors that allow setting supported properties.

    7.1.0release notes

  • KeyboardEvent is now implemented.

    7.1.0release notes

  • TouchEvent is now implemented, although it does not yet have a constructor.

    7.1.0release notes

  • The AT_TARGET event-phase constant is now available.

    7.0.0release notes

  • Blob is now supported by the XMLHttpRequest implementation.

    7.0.0release notes

  • The BUBBLING_PHASE event-phase constant is now available.

    7.0.0release notes

  • The CAPTURING_PHASE event-phase constant is now available.

    7.0.0release notes

  • document.charset is now available as an alias for document.characterSet.

    7.0.0release notes

  • Event.prototype.stopImmediatePropagation is now available.

    7.0.0release notes

  • File is now supported by the XMLHttpRequest implementation.

    7.0.0release notes

  • FileList is now supported by the XMLHttpRequest implementation.

    7.0.0release notes

  • FileReader is now supported by the XMLHttpRequest implementation.

    7.0.0release notes

  • FormData is now supported by the XMLHttpRequest implementation.

    7.0.0release notes

  • HTMLTemplateElement.prototype.content now exposes a template's contents as a document fragment.

    7.0.0release notes

  • The agentOptions option adds new request-management control.

    7.0.0release notes

  • The pool option adds new request-management control.

    7.0.0release notes

  • The userAgent option adds new request-management control.

    7.0.0release notes

  • The NONE event-phase constant is now available.

    7.0.0release notes

  • ProgressEvent is now supported by the XMLHttpRequest implementation.

    7.0.0release notes

  • Resource loads can now be aborted.

    7.0.0release notes

  • Synchronous XMLHttpRequests are now supported.

    7.0.0release notes

  • XMLHttpRequestEventTarget is now supported as part of the XMLHttpRequest implementation.

    7.0.0release notes

  • XMLHttpRequestUpload is now supported as part of the XMLHttpRequest implementation.

    7.0.0release notes

Behavior and default changes 3

  • postMessage tasks now use jsdom's timer queue, making them easier to mock.

    7.2.0release notes

  • Uses sax as the default XML parser, fixing many XML and XHTML parsing issues.

    7.2.0release notes

  • XMLHttpRequest and related classes were completely re-implemented with more complete, standards-compliant behavior.

    7.0.0release notes

Fixes and other changes 23

  • Fixed canvasEl.toDataURL() argument handling when the canvas npm package is installed.

    7.2.2release notes

  • Fixed data: URL parsing to allow empty contents, such as data:text/css;base64,.

    7.2.2release notes

  • Fixed a regression when parsing attributes with a namespace URL but no prefix.

    7.2.1release notes

  • Canvas contents now reset when width or height changes, including changes from the default dimensions.

    7.2.0release notes

  • Fixes doctype parsing that confused the system ID and public ID.

    7.2.0release notes

  • Fixes HTMLCollections containing elements with numeric id or name values.

    7.2.0release notes

  • document.writeln now correctly handles multiple arguments instead of ignoring all arguments after the first.

    7.1.1release notes

  • FileList objects no longer contain a property named "undefined".

    7.1.1release notes

  • Unresolvable iframe URLs now load about:blank instead of crashing jsdom, matching spec behavior.

    7.1.1release notes

  • Creating a customevent now correctly returns a CustomEvent instead of an Event.

    7.1.0release notes

  • The Event class hierarchy now has more complete functionality and correct public APIs.

    7.1.0release notes

  • EventTarget now follows the specification exactly, improving edge-case behavior.

    7.1.0release notes

  • Browser builds can again fetch URLs for content and similar uses.

    7.1.0release notes

  • Template parsing and serialization now make innerHTML work as specified.

    7.1.0release notes

  • appendChild now validates its arguments more correctly.

    7.1.0release notes

  • insertBefore now validates its arguments more correctly.

    7.1.0release notes

  • replaceChild now validates its arguments more correctly.

    7.1.0release notes

  • Template parsing and serialization now make outerHTML work as specified.

    7.1.0release notes

  • Fixed RegExp literals inside jsdom script code so instanceof RegExp returns true.

    7.0.2release notes

  • Comparing two elements with attributes no longer throws an error.

    7.0.1release notes

  • Loose cookie parsing now correctly handles assignments such as document.cookie = "foo".

    7.0.0release notes

  • document.styleSheets now correctly tracks stylesheet removal from the document.

    7.0.0release notes

  • The created callback now receives the same window object as the loaded and done callbacks when scripting is enabled.

    7.0.0release notes

jsdom 659 changes

Breaking changes 13

  • Now splits class arguments on whitespace, requires all classes, returns an HTMLCollection, and memoizes the result to match the specification.

    6.4.0release notes

  • Now matches the specification and no longer inherits from NodeList.

    6.4.0release notes

  • The href getter now applies spec-compliant fallbacks and always returns an absolute URL.

    6.3.0release notes

  • Removed the vestigial HTMLIsIndexElement global property.

    6.3.0release notes

  • sendTo(console) now forwards jsdomError events to console.error by default.

    6.2.0release notes

  • Nodes no longer expose the nonstandard errors array.

    6.0.0release notes

  • hashchange now emits HashChangeEvent instances with correctly named newURL and oldURL properties.

    6.0.0release notes

  • io.js 2.0 or newer is now required because jsdom uses ES2015 features.

    6.0.0release notes

  • The done callback now receives one error object instead of an array of errors.

    6.0.0release notes

  • The load(errors, window) callback is replaced by onload(window), reflecting window.onload behavior.

    6.0.0release notes

  • Callers may need to pass file: URLs where filenames previously worked.

    6.0.0release notes

  • Nodes no longer expose the raise method used to add entries to the errors array.

    6.0.0release notes

  • jsdom no longer uses setimmediate, removing its eval-based incompatibility with CSP scenarios.

    6.0.0release notes

New APIs and options 26

  • Allows cookie as either a top-level option or nested under document.

    6.5.1release notes

  • Allows referrer as either a top-level option or nested under document.

    6.5.1release notes

  • Allows cookie as either a top-level option or nested under document.

    6.5.1release notes

  • Allows referrer as either a top-level option or nested under document.

    6.5.1release notes

  • Adds iteration support so developers can use for-of loops with NodeLists.

    6.5.0release notes

  • Adds the element that initiated a resource load, enabling customization based on the loading element.

    6.4.0release notes

  • Adds an API to retrieve the source-text location of a given node.

    6.4.0release notes

  • Allows changing a window's top property.

    6.4.0release notes

  • Implemented HTMLAudioElement in full, while its HTMLMediaElement base remains largely a stub.

    6.3.0release notes

  • Added a complete implementation of HTMLDataElement.

    6.3.0release notes

  • Added a stub implementation of HTMLDataListElement.

    6.3.0release notes

  • Added a stub implementation of HTMLDialogElement.

    6.3.0release notes

  • Added a stub implementation of HTMLEmbedElement.

    6.3.0release notes

  • Added appropriate constants to HTMLMediaElement.

    6.3.0release notes

  • Added a stub implementation of HTMLMeterElement.

    6.3.0release notes

  • Added a complete implementation of HTMLSpanElement.

    6.3.0release notes

  • Added a complete implementation of HTMLTimeElement.

    6.3.0release notes

  • Added a property returning the node's owner document base URL.

    6.3.0release notes

  • Added a fully spec-compliant implementation of window.atob.

    6.3.0release notes

  • Added a fully spec-compliant implementation of window.btoa.

    6.3.0release notes

  • Added a full-featured, spec-compliant classList implementation.

    6.2.0release notes

  • Added an option to disable forwarding jsdomError events when using sendTo(console).

    6.2.0release notes

  • Added a basic implementation of HTMLMediaElement for use in jsdom.

    6.1.0release notes

  • Added a basic implementation of HTMLVideoElement for use in jsdom.

    6.1.0release notes

  • A new ErrorEvent class is available as part of script error handling.

    6.0.0release notes

  • XMLHttpRequest.prototype.response is now available as a getter.

    6.0.0release notes

Behavior and default changes 7

  • Canvas elements now expose a uniform spec-compliant API with or without the canvas package installed.

    6.3.0release notes

  • Updated HTMLTableCellElement to the latest specification.

    6.3.0release notes

  • Updated HTMLTableDataCellElement to the latest specification.

    6.3.0release notes

  • Updated HTMLTableHeaderCellElement to the latest specification.

    6.3.0release notes

  • Updated HTMLTableRowElement to the latest specification.

    6.3.0release notes

  • Updated HTMLTableSectionElement to the latest specification.

    6.3.0release notes

  • The url option is now resolved as a URL before installation as document.URL, including a trailing slash for host-only URLs.

    6.3.0release notes

Fixes and other changes 13

  • An about:blank iframe without base elements now falls back to the parent window's base URL.

    6.3.0release notes

  • Canvas elements now have the correct HTMLCanvasElement and HTMLElement instanceof relationships when the canvas package is installed.

    6.3.0release notes

  • The height property now reflects the height attribute and defaults to 150.

    6.3.0release notes

  • The width property now reflects the width attribute and defaults to 300.

    6.3.0release notes

  • Canvas elements now work better with other jsdom APIs when the canvas package is installed, including document.getElementById.

    6.3.0release notes

  • The DOMSubtreeModified event now fires in more cases, though mutation events remain incomplete.

    6.2.0release notes

  • Fixed errors when parsing invalid doctype declarations such as <!DOCTYPE>.

    6.2.0release notes

  • Stopped emitting spurious jsdomError events after window.close().

    6.2.0release notes

  • No longer crashes when used with file: URLs.

    6.0.1release notes

  • Correctly returns response text when responseType is unset.

    6.0.1release notes

  • StyleSheetList.prototype.item now works correctly.

    6.0.0release notes

  • The browser vm shim now adds built-in global properties to the sandbox, fixing scripts run in web workers.

    6.0.0release notes

  • window.onerror and error event listeners now catch all script errors, similarly to browsers.

    6.0.0release notes

jsdom 551 changes

Breaking changes 12

  • DOM attribute handling now follows the specification more closely, including updated NamedNodeMap, Element methods, and style attribute behavior.

    5.4.0release notes

  • Removed the erroneously added mapDOMNodes function from window.

    5.4.0release notes

  • Removed the erroneously added mapper function from window.

    5.4.0release notes

  • Removed the erroneously added visitTree function from window.

    5.4.0release notes

  • The setter now converts null to the cookie value "null" instead of ignoring it.

    5.0.1release notes

  • Calling document.write on XML documents now throws as required by the specification.

    5.0.1release notes

  • The setter now converts undefined to the string "undefined" instead of ignoring it.

    5.0.1release notes

  • XML documents no longer receive an automatically inserted HTML document structure when created without arguments.

    5.0.1release notes

  • Added an API for creating cookie jars that can be shared among multiple jsdom documents.

    5.0.0release notes

  • Added cookieJar configuration for supplying shared cookie jars to jsdom documents.

    5.0.0release notes

  • Removed cookieDomain configuration from jsdom document creation.

    5.0.0release notes

  • Removed the jar option from jsdom document creation configuration.

    5.0.0release notes

New APIs and options 10

  • Added support for communicating between parent windows, iframes, and combinations thereof, with some origin and structured-cloning semantics still missing.

    5.5.0release notes

  • Added nextElementSibling to Element and the various types of CharacterData.

    5.4.0release notes

  • Added previousElementSibling to Element and the various types of CharacterData.

    5.4.0release notes

  • A factory creates virtual consoles that can be installed before document creation to catch initialization events.

    5.3.0release notes

  • Document creation methods accept a virtual console before creation, allowing virtual console events during initialization to be caught.

    5.3.0release notes

  • Implemented the childElementCount property through the ParentNode mixin.

    5.2.0release notes

  • Implemented the firstElementChild property through the ParentNode mixin.

    5.2.0release notes

  • Implemented the lastElementChild property through the ParentNode mixin.

    5.2.0release notes

  • Implemented the outerHTML setter, allowing developers to assign serialized markup.

    5.2.0release notes

  • Added support for the NodeIterator class from the DOM Standard.

    5.1.0release notes

Behavior and default changes 7

  • Attrs can no longer be cloned according to the latest specification, although cloneNode remains for legacy reasons.

    5.5.0release notes

  • StyleSheetList now inherits from Array, matching the latest CSSOM specification.

    5.4.0release notes

  • Elements with id or certain name attributes now create named properties and global variables on window, improving script compatibility.

    5.4.0release notes

  • Node.js now fails fast with a clear error message to avoid confusion from syntax errors.

    5.1.0release notes

  • Cookie handling is delegated to tough-cookie, bringing additional previously missing cookie behaviors.

    5.0.0release notes

  • Descendant iframes automatically share cookie jars, allowing same-domain iframes to access appropriate cookies.

    5.0.0release notes

  • document.cookie now accepts arrays, allowing multiple cookies to be set at once.

    5.0.0release notes

Fixes and other changes 22

  • Stops createAttributeNS from accidentally creating a global attribute variable.

    5.6.1release notes

  • CSS properties using url("quoted string") now parse correctly.

    5.6.1release notes

  • Selectors matching the empty string, such as div[title=""], now work correctly.

    5.6.1release notes

  • Clicking submit buttons now submits their containing form, matching input type=submit behavior.

    5.5.0release notes

  • The type property of button elements now defaults to submit and remains within the allowed range.

    5.5.0release notes

  • Elements with unusual tag names that only the parser normally creates can now be cloned.

    5.5.0release notes

  • Doctypes can now be cloned in accordance with the latest specification.

    5.5.0release notes

  • Cloned documents now correctly preserve their URL and content-type.

    5.5.0release notes

  • document.open() now returns the document itself as required by the specification.

    5.5.0release notes

  • Virtual console output from iframes is now proxied to the parent window's virtual console.

    5.5.0release notes

  • Invalid values assigned to el.style.cssText or the style attribute are ignored instead of throwing an error.

    5.4.3release notes

  • License metadata now conforms to the latest npm standards.

    5.4.2release notes

  • Restored compatibility with browserify after a regression introduced in v5.4.0.

    5.4.1release notes

  • Fixed getElementById for img elements whose id attributes were modified.

    5.4.0release notes

  • The virtualConsole option now works with jsdom.env as well as jsdom.jsdom.

    5.4.0release notes

  • The default HTML stylesheet is now applied, making computed styles more accurate and allowing jQuery show() and hide() methods to work correctly.

    5.4.0release notes

  • Fixed relative stylesheet resolution when using @import.

    5.2.0release notes

  • Fixed outerHTML getter results for select and form elements.

    5.2.0release notes

  • Fixed incorrect results and failures in documents created without a window.

    5.2.0release notes

  • The initial request now shares its cookie jar with subsequent requests, avoiding possible EventEmitter memory leak warnings.

    5.1.0release notes

  • document.write now accepts multiple arguments and concatenates them.

    5.0.1release notes

  • Calling document.write with an empty string no longer attempts to insert a default HTML document structure.

    5.0.1release notes

jsdom 432 changes

Breaking changes 7

  • Removed an unnecessary browserify dependency that was erroneously included in 4.5.0.

    4.5.1release notes

  • Unknown elements now create HTMLUnknownElement instances instead of HTMLElement instances.

    4.0.5release notes

  • document.createEvent accepts more argument types and throws for invalid arguments according to the DOM Standard.

    4.0.2release notes

  • The native Contextify dependency was eliminated, making jsdom easier to install without a C++ compiler toolchain.

    4.0.0release notes

  • The non-standard document.parentWindow property was removed; use the standard document.defaultView instead.

    4.0.0release notes

  • jsdom no longer works with Node.js; applications must use io.js or remain on the 3.x series.

    4.0.0release notes

  • Window instances no longer implicitly share parser- and serializer-related state.

    4.0.0release notes

New APIs and options 7

  • Adds document.currentScript for accessing the currently executing script element.

    4.5.0release notes

  • Event instances now expose whether preventDefault() has been called.

    4.3.0release notes

  • MouseEvent now accepts a second parameter, behaving the same as Event's second parameter for now.

    4.2.0release notes

  • MutationEvent now accepts a second parameter, behaving the same as Event's second parameter for now.

    4.2.0release notes

  • UIEvent now accepts a second parameter, behaving the same as Event's second parameter for now.

    4.2.0release notes

  • The Event constructor now accepts a second parameter to set bubbles and cancelable properties.

    4.1.0release notes

  • DOMException provides a more comprehensive set of constants.

    4.0.2release notes

Performance 1

  • Window creation is approximately 600% faster when no scripts are executed.

    4.0.3release notes

Behavior and default changes 5

  • The click() method is now defined on HTMLElement.prototype instead of HTMLInputElement.prototype, matching the latest spec.

    4.3.0release notes

  • The click() method now dispatches a MouseEvent instead of a generic Event.

    4.3.0release notes

  • DOMException instances now have name properties.

    4.0.2release notes

  • Some Window data properties became accessors for improved specification compliance.

    4.0.0release notes

  • Window methods moved from the prototype to each instance for improved specification compliance.

    4.0.0release notes

Fixes and other changes 12

  • Dispatching click events now activates radio buttons and checkboxes, matching the behavior of el.click().

    4.3.0release notes

  • Fixed named and indexed window properties and window.length when frames or iframes are added or removed.

    4.0.5release notes

  • Doctype parsing now relies on information provided by the HTML parser when possible.

    4.0.4release notes

  • Fixed cases where childNodes was not correctly up to date.

    4.0.3release notes

  • EventTarget handlers now execute in FIFO order, as required by the specification.

    4.0.3release notes

  • Chrome 40 is supported again; latest stable Firefox and IE versions should also work, though less well-tested.

    4.0.2release notes

  • Events created with new Event("click") can now be dispatched.

    4.0.2release notes

  • EventTarget is now correctly in the prototype chain of Window.

    4.0.2release notes

  • EventTarget argument validation now follows the DOM Standard.

    4.0.2release notes

  • Node.prototype.contains now always returns a boolean, correcting a regression introduced in 3.1.1.

    4.0.1release notes

  • Document.prototype now correctly delegates its ownerDocument getter to Node.prototype.

    4.0.1release notes

  • Fixed edge cases when running scripts in browserified jsdom.

    4.0.1release notes

jsdom 338 changes

Breaking changes 16

  • Removed isSameNode because it is not part of the DOM Standard and only performed a verbose strict-equality check.

    3.1.1release notes

  • CDATA sections were removed from the DOM APIs.

    3.0.0release notes

  • Default attributes were removed from the DOM APIs.

    3.0.0release notes

  • Documents now default to about:blank instead of inferring a file URL or using location.href.

    3.0.0release notes

  • DocumentType now follows the DOM Standard and no longer includes notations, entities, or default attributes.

    3.0.0release notes

  • Accessors on Node, Element, Attr, and Document were corrected to match the specification; some nonstandard setters were removed.

    3.0.0release notes

  • Removed the non-standard addFeature method from DOMImplementation.

    3.0.0release notes

  • DOMImplementation.hasFeature now always returns true.

    3.0.0release notes

  • Removed the ownerDocument property from DOMImplementation.

    3.0.0release notes

  • Removed the non-standard removeFeature method from DOMImplementation.

    3.0.0release notes

  • Entities were removed from the DOM APIs.

    3.0.0release notes

  • Entity types were removed from the DOM APIs.

    3.0.0release notes

  • 3.0.x is the last jsdom release supporting Node.js; future releases will require io.js.

    3.0.0release notes

  • Notations were removed from the DOM APIs.

    3.0.0release notes

  • console.error no longer contributes to the non-standard window.errors array.

    3.0.0release notes

  • XML and HTML documents now differ more accurately in tag-name and attribute casing.

    3.0.0release notes

New APIs and options 2

  • Adds the named Image(width, height) constructor.

    3.0.0release notes

  • A virtual console abstraction captures console output from inside the page.

    3.0.0release notes

Performance 1

  • Some properties moved to Document.prototype and Window.prototype, improving memory usage and specification compliance.

    3.0.0release notes

Behavior and default changes 6

  • Comment now follows the DOM Standard and derives from CharacterData.

    3.0.0release notes

  • document.contentType is now generally inferred from the document parsing mode.

    3.0.0release notes

  • Name and qualified-name validation now uses xml-name-validator and centralized algorithms.

    3.0.0release notes

  • The XML parser now has limited awareness of processing instructions.

    3.0.0release notes

  • ProcessingInstruction now follows the DOM Standard and derives from CharacterData.

    3.0.0release notes

  • Text now follows the DOM Standard and derives from CharacterData.

    3.0.0release notes

Fixes and other changes 13

  • URL resolution now handles about:blank properly on all systems, including the default URL since 3.0.0.

    3.1.2release notes

  • Scripts can now run at least partially inside a browserified jsdom instance through dynamic global reference rewriting.

    3.1.2release notes

  • Calling window.alert no longer crashes applications in cases handled by the NOT_IMPLEMENTED helper.

    3.1.2release notes

  • Triggering NOT_IMPLEMENTED methods such as window.location.reload no longer leaks a global variable.

    3.1.2release notes

  • Scripts generally do not work well in browserified jsdom, despite fixes to browserifying issues around jsdom.env.

    3.1.1release notes

  • Updated isEqualNode to the DOM Standard algorithm, fixing an error thrown during comparison.

    3.1.1release notes

  • Unchecking a radio button no longer incorrectly unchecks radio buttons outside its containing form.

    3.0.2release notes

  • Empty HTML strings passed through the html option are now handled.

    3.0.1release notes

  • Null bytes passed to autodetecting capabilities are now handled.

    3.0.1release notes

  • Serialization errors for text nodes were fixed, including cases possibly occurring inside template elements.

    3.0.1release notes

  • CharacterData now follows DOM Standard algorithms, removing some exceptions previously thrown.

    3.0.0release notes

  • Doctype parsing and association with documents were cleaned up, improving handling of exotic doctypes.

    3.0.0release notes

  • Fixes an exception when querySelector receives selectors such as div:last-child > span[title].

    3.0.0release notes

jsdom 24 changes

Breaking changes 3

  • Replaced the nonstandard matchesSelector method with the standard matches method.

    2.0.0release notes

  • Removed the level option from jsdom.jsdom.

    2.0.0release notes

  • Removed the defunct jsdom.level public API in favor of the living standard model.

    2.0.0release notes

Fixes and other changes 1

  • querySelector now correctly coerces its argument to a string.

    2.0.0release notes

jsdom 141 changes

Breaking changes 5

  • div.toString() now returns [object HTMLDivElement].

    1.4.0release notes

  • Separate cssstyle-browserify dependency is no longer required; cssstyle can be used directly.

    1.0.3release notes

  • Returns true when the default is not prevented, correcting the previous opposite behavior.

    1.0.1release notes

  • The nonstandard document.innerHTML API was removed.

    1.0.0release notes

  • The nonstandard EventTarget.getListeners API was removed.

    1.0.0release notes

New APIs and options 4

  • Adds missing console methods; most currently do nothing, while assert is implemented.

    1.5.0release notes

  • The textLength property now exists on HTMLTextAreaElement.

    1.4.0release notes

  • Adds NodeFilter, including its constants.

    1.2.0release notes

  • Adds document.implementation.createHTMLDocument() for creating HTML documents.

    1.1.0release notes

Performance 5

  • Makes childNodes and the many places in jsdom that use it much faster.

    1.5.0release notes

  • Faster implementation should speed up common operations like appendChild and similar.

    0.8.8, 1.4.1release notesrelease notes

  • Performance improved for several AttributeList methods, reducing the cost of attribute operations.

    1.2.3release notes

  • Performance improved for Node.prototype.insertBefore, reducing the cost of this DOM mutation method.

    1.2.3release notes

  • Performance improved for Node.prototype.removeChild, reducing the cost of this DOM mutation method.

    1.2.3release notes

Behavior and default changes 4

  • blur is now available on HTMLElement.prototype instead of only certain element prototypes.

    1.3.0release notes

  • focus is now available on HTMLElement.prototype instead of only certain element prototypes.

    1.3.0release notes

  • cssstyle is no longer pinned, allowing future upstream fixes to arrive automatically.

    1.0.3release notes

  • In browsers, options.url now defaults to location.href instead of an inferred fil:// URL.

    1.0.2release notes

Fixes and other changes 23

  • document.cloneNode now works.

    1.4.0release notes

  • Resetting a form now follows the specification for all form element types.

    1.4.0release notes

  • hasAttribute is now case-insensitive as required by the specification.

    1.4.0release notes

  • The checked property now behaves according to the specification.

    1.4.0release notes

  • The defaultChecked property now behaves according to the specification.

    1.4.0release notes

  • The value property now behaves according to the specification.

    1.4.0release notes

  • The selected property now behaves according to the specification.

    1.4.0release notes

  • The value property now behaves according to the specification.

    1.4.0release notes

  • Resetting radio buttons now correctly resets the other radio buttons according to the specification.

    1.4.0release notes

  • Checks whether module.parent exists before constructing a document's initial URL, compensating for testing frameworks that do not correctly emulate the module environment.

    1.3.2release notes

  • Changing attributes on option elements now produces the correct consequences, including correct document.getElementById interaction when changing id.

    1.3.1release notes

  • The text-node data setter now correctly coerces assigned values to strings.

    1.2.2release notes

  • document.toString() now returns the standard HTMLDocument object string.

    1.2.2release notes

  • Arguments are now correctly coerced to strings, allowing arrays to be passed.

    1.2.2release notes

  • Parsing and serialization of <template> elements now work correctly because parse5 supports them.

    1.2.1release notes

  • The initial history.length is now 1 instead of 0.

    1.2.0release notes

  • history.pushState no longer fires the popstate event.

    1.2.0release notes

  • history.replaceState no longer fires the popstate event.

    1.2.0release notes

  • Ensures localName is no longer null for elements when it should not be.

    1.1.0release notes

  • Browserifying jsdom should work better because required packages are now declared as dependencies.

    1.0.2release notes

  • The dependency is temporarily pinned to version 0.2.18 or earlier to avoid a known CSSStyleDeclaration issue.

    1.0.2release notes

  • The defaultValue property is now correctly synced to the value="" attribute.

    1.0.0release notes

  • The value property is now correctly synced to the value="" attribute.

    1.0.0release notes

jsdom 0.1114 changes

Breaking changes 3

  • Attributes reflected as properties now return '' when absent, while getAttribute still returns null.

    0.11.1release notes

  • DOCTYPE names are no longer uppercased during parsing.

    0.11.0release notes

  • DOCTYPEs now appear in the output of document.innerHTML.

    0.11.0release notes

New APIs and options 4

  • Adds Node.prototype.parentElement for accessing a node's parent element.

    0.11.1release notes

  • navigator.cookieEnabled is now implemented and always returns true.

    0.11.0release notes

  • Various document position constants were added to the Node constructor.

    0.11.0release notes

  • Node.prototype.contains is now implemented.

    0.11.0release notes

Behavior and default changes 1

  • A new default level focuses jsdom on the DOM Living Standard and HTML Living Standard, enabling more modern DOM and HTML features.

    0.11.0release notes

Fixes and other changes 6

  • Corrects the default URL used by jsdom.jQueryify to load jQuery.

    0.11.1release notes

  • Makes textContent work for nodes without children, including text nodes.

    0.11.1release notes

  • DocumentType.prototype.parentNode now returns the document node instead of null.

    0.11.0release notes

  • A bug involving invalid script paths and jsdom.jQueryify was fixed.

    0.11.0release notes

  • Various navigator properties are now getters instead of data properties.

    0.11.0release notes

  • Node.prototype.compareDocumentPosition is now implemented correctly.

    0.11.0release notes

jsdom 0.1016 changes

Breaking changes 2

  • Serializing void elements no longer includes a space-slash, producing <br> instead of <br />.

    0.10.5release notes

  • window.location.port now defaults to an empty string instead of null.

    0.10.1release notes

New APIs and options 4

  • Remaining URL properties are now available on HTMLAnchorElement.

    0.10.6release notes

  • Remaining URL properties are now available on window.location.

    0.10.6release notes

  • Added querySelector to DocumentFragments.

    0.10.4release notes

  • Added querySelectorAll to DocumentFragments.

    0.10.4release notes

Behavior and default changes 3

  • Defaults should usually be the empty string instead of null.

    0.10.3release notes

  • Defaults should usually be the empty string instead of null.

    0.10.3release notes

  • document.cookie now supports multiple cookies, though options like path and max-age remain ignored.

    0.10.0release notes

Fixes and other changes 7

  • Iframes correctly load about:blank when the src attribute is empty or missing.

    0.10.6release notes

  • Reflected attributes no longer break when String.prototype.normalize is available by default in newer Node versions.

    0.10.6release notes

  • Documents containing only whitespace now generate wrapper documents, matching blank documents.

    0.10.6release notes

  • The list of void elements now matches the latest HTML specification.

    0.10.5release notes

  • Fixed another case where jQuery 1.11's show method caused errors.

    0.10.4release notes

  • Using jQuery 1.11's show() method no longer throws an error.

    0.10.2release notes

  • window.location properties now update correctly after pushState or replaceState.

    0.10.2release notes

jsdom 0.97 changes

Breaking changes 2

  • An empty namespace URI is now treated as meaning no namespace.

    0.9.0release notes

  • HTMLInputElement no longer has a type attribute by default, while its type property remains "text".

    0.9.0release notes

New APIs and options 2

Behavior and default changes 1

  • Attribute ordering now follows WHATWG DOM semantics, with more accurate attribute storage behavior.

    0.9.0release notes

Fixes and other changes 2

  • An empty namespace URI is now treated as meaning no namespace.

    0.9.0release notes

  • An empty namespace URI is now treated as meaning no namespace.

    0.9.0release notes

jsdom 0.822 changes

New APIs and options 10

  • Cookies are stored and used between requests, with customizable cookie jars supported.

    0.8.11release notes

  • Adds a hash property to HTMLAnchorElement.

    0.8.10release notes

  • CSS now supports the @-moz-document at-rule.

    0.8.9release notes

  • Adds the host property to HTMLAnchorElement.

    0.8.7release notes

  • Adds a dummy method returning 0 for all rectangle properties.

    0.8.6release notes

  • Adds an href property to CSSStyleSheet instances for external CSS files.

    0.8.5release notes

  • Typed array constructors are now available on window.

    0.8.4release notes

  • Basic history navigation and state methods are now supported.

    0.8.2release notes

  • Adds a property that evaluates to true for specifically distinguishing jsdom in tests.

    0.8.0release notes

  • Adds working XMLHttpRequest support, including cookie passing.

    0.8.0release notes

Behavior and default changes 2

  • CSS now supports many shorthand properties.

    0.8.9release notes

  • Documents beginning with an XML declaration are parsed as XML without lowercasing tags.

    0.8.2release notes

Fixes and other changes 10

  • Attributes named like NamedNodeMap prototype properties no longer break jsdom.

    0.8.11release notes

  • Calling removeAttributeNS on a missing attribute no longer throws.

    0.8.11release notes

  • CSS unit handling is improved.

    0.8.9release notes

  • Stops accidentally modifying Error.prototype.

    0.8.6release notes

  • querySelector is now placed on Element and Document prototypes instead of being an own-property.

    0.8.4release notes

  • querySelectorAll is now placed on Element and Document prototypes instead of being an own-property.

    0.8.4release notes

  • Auto-detection of whether the first parameter is an HTML string or filename now handles long strings without erroring.

    0.8.3release notes

  • Tag names passed to createElement are coerced to strings before evaluation.

    0.8.2release notes

  • Fixed a casing issue that prevented jsdom from loading on Unix and Solaris systems.

    0.8.1release notes

  • Fixed the broken window.location.replace behavior.

    0.8.1release notes

jsdom 0.79 changes

Breaking changes 1

  • The html property no longer uses the previous string auto-detection behavior, making this a breaking change.

    0.7.0release notes

New APIs and options 3

  • hashchange events now fire when the URL hash changes.

    0.7.0release notes

  • The file property provides an explicit way to specify file input.

    0.7.0release notes

  • The url property provides an explicit way to specify URL input.

    0.7.0release notes

Behavior and default changes 1

  • window.location is now more complete and accurate, including hashchange events when the hash changes.

    0.7.0release notes

Fixes and other changes 4

  • Errors raised in scripts are now passed to jsdom.env's callback.

    0.7.0release notes

  • String input detection is more accurate, changing how jsdom.env interprets passed strings.

    0.7.0release notes

  • Errors for unsupported features now identify exactly which feature is not implemented.

    0.7.0release notes

  • window.location.href is set correctly when constructing a window from a URL that redirects.

    0.7.0release notes

jsdom 0.615 changes

Breaking changes 1

  • Empty attributes now expose an empty string value instead of the attribute name.

    0.6.0release notes

New APIs and options 1

  • Frames and iframes are now accessible through named properties.

    0.6.2release notes

Behavior and default changes 2

  • Attribute names may now use any value permitted by HTML5, including characters such as ^.

    0.6.0release notes

  • Attribute values may now use any value permitted by HTML5, including > and <.

    0.6.0release notes

Fixes and other changes 11

  • Custom attributes named like Object.prototype properties no longer confuse jsdom.

    0.6.5release notes

  • CSS selectors containing commas inside quotes are no longer misinterpreted.

    0.6.4release notes

  • img elements now fire load events when their src attributes change.

    0.6.4release notes

  • Improves automatic detection of URLs versus HTML fragments when using jsdom.env.

    0.6.3release notes

  • node-canvas integration is fixed after being broken since version 0.5.7.

    0.6.2release notes

  • URL resolution now handles document URLs, base tags, and relative hrefs more browser-compatibly, affecting external resources and href/src accuracy.

    0.6.2release notes

  • The code is now parseable with Esprima, improving compatibility with Esprima-based tooling.

    0.6.1release notes

  • The package metadata now uses repository instead of repositories to prevent npm warnings.

    0.6.1release notes

  • The innerHTML of script tags no longer loses its first character.

    0.6.0release notes

  • Multiline attributes are no longer mangled during parsing.

    0.6.0release notes

  • Elements with optional closing tags, such as p or td, are now parsed correctly.

    0.6.0release notes

jsdom 0.519 changes

Breaking changes 1

  • This release and future releases require at least Node.js 0.8.

    0.5.4release notes

Deprecations 1

  • This release remains compatible with Node.js 0.6; future releases will require at least Node.js 0.8.

    0.5.3release notes

New APIs and options 1

  • The parser can now be configured through jsdom.env.

    0.5.4release notes

Fixes and other changes 16

  • canvas behaves like a div when node-canvas is unavailable instead of causing a crash.

    0.5.7release notes

  • Event handlers now support return false and receive the event argument more spec-compatibly.

    0.5.7release notes

  • The textContent getter is more accurate for comment nodes and processing instruction nodes.

    0.5.7release notes

  • HTMLCollections now expose named properties for members' id and name attributes, enabling access such as form.elements.inputId.

    0.5.6release notes

  • Event handler properties now update correctly through setAttributeNode, attributeNode.value =, removeAttribute, and removeAttributeNode.

    0.5.6release notes

  • Corrected the property when the attribute value is falsy, such as an empty attribute value.

    0.5.5release notes

  • Corrected the property when the attribute value is falsy, such as an empty attribute value.

    0.5.5release notes

  • Accessing rowIndex for table rows outside a table no longer throws.

    0.5.4release notes

  • Image src properties now resolve relative to location.href, matching anchor href behavior.

    0.5.4release notes

  • getAttributeNS now returns null for absent attributes, matching getAttribute.

    0.5.3release notes

  • Stylesheets containing @-webkit-keyframes no longer crash getComputedStyle calls.

    0.5.2release notes

  • The features option is handled correctly by jsdom.env.

    0.5.2release notes

  • Radio buttons now allow only one checked button, and clicking one no longer incorrectly unchecks it.

    0.5.1release notes

  • Calling click on input elements now fires a click event.

    0.5.1release notes

  • selectedIndex now changes correctly when option elements are selected, making select elements work properly, especially with jQuery.

    0.5.1release notes

  • Makes contextify a non-optional dependency because jsdom never worked without it.

    0.5.0release notes

jsdom 0.47 changes

Breaking changes 3

  • getAttribute now returns null for attributes that are not present, matching DOM4 behavior.

    0.4.0release notes

  • Nonstandard NodeList properties such as toArray are now hidden unless prefixed with an underscore.

    0.4.0release notes

  • NodeList instances no longer provide array methods, including indexOf, matching the specification.

    0.4.0release notes

Performance 1

  • The querySelectorAll implementation was adjusted for improved accuracy and speed.

    0.4.2release notes

Behavior and default changes 1

  • Static NodeList-returning methods such as querySelectorAll now return a real NodeList instance.

    0.4.0release notes

Fixes and other changes 2

  • selected now returns true for the first <option> in a <select> when nothing is explicitly set.

    0.4.2release notes

  • Loading HTML files no longer crashes when an <a> tag lacks an href attribute.

    0.4.1release notes

jsdom 0.313 changes

Breaking changes 2

  • A window's load event now always fires asynchronously, including when no external resources are needed.

    0.3.0release notes

  • Turning off mutation events is no longer supported because it breaks external-resource fetching.

    0.3.0release notes

New APIs and options 3

  • Adds a basic blur() implementation on appropriate elements.

    0.3.0release notes

  • Adds a basic focus() implementation on appropriate elements.

    0.3.0release notes

  • Adds the matchesSelector API through nwmatcher.

    0.3.0release notes

Behavior and default changes 1

  • Styles from style and linked stylesheet elements are now applied to getComputedStyle results.

    0.3.0release notes

Fixes and other changes 7

  • Stylesheets with @media rules no longer crash calls to getComputedStyle, including those in jQuery initialization.

    0.3.4release notes

  • document.write calls now insert new elements correctly.

    0.3.3release notes

  • Inputs without a type attribute now return "text" from getAttribute.

    0.3.3release notes

  • Stylesheets with comma-separated selectors now apply when using getComputedStyle.

    0.3.2release notes

  • Prevents crashes when stylesheets contain invalid selectors.

    0.3.1release notes

  • Script filenames containing spaces now work when passed to jsdom.env.

    0.3.0release notes

  • A real querySelector implementation solves many outstanding querySelector bugs.

    0.3.0release notes

jsdom 0.2116 changes

Breaking changes 18

  • attr is no longer placed in the global scope when using node-canvas.

    0.2.19release notes

  • cssText is no longer as accurate after reverting use of the cssstyle package.

    0.2.17release notes

  • style is no longer as accurate after reverting use of the cssstyle package.

    0.2.17release notes

  • HTMLOptionElement.text now returns the option's text rather than its value.

    0.2.16release notes

  • The name property is now exposed only on specific tags and accurately reflects the corresponding name attribute.

    0.2.16release notes

  • Falsy values assigned to text nodes are converted to strings instead of becoming empty strings.

    0.2.16release notes

  • outerHTML is no longer formatted, which is especially important for pre elements.

    0.2.16release notes

  • Text instances no longer expose a value property.

    0.2.16release notes

  • Exceptions occurring in the callback are no longer swallowed.

    0.2.14release notes

  • Single tags now serialize with a space before the closing slash.

    0.2.14release notes

  • Disabling external script processing also prevents inline event handlers from running.

    0.2.10release notes

  • The trigger name changes to raise for a more descriptive API.

    0.2.10release notes

  • removeAttributeNS no longer returns a value.

    0.2.6release notes

  • The method now returns only elements attached to the document.

    0.2.5release notes

  • Attr.specified is now readonly.

    0.2.1release notes

  • download now receives the object returned by URL.parse() as its first parameter.

    0.2.1release notes

  • setAttributeNS() no longer returns a value.

    0.2.1release notes

  • setNamedItem no longer sets Node.parentNode.

    0.2.1release notes

Security 1

New APIs and options 24

  • Adds SkipExternalResources, which accepts a regular expression for skipping external resources.

    0.2.19release notes

  • Anchor elements gain a hostname property to comply with the WHATWG standard.

    0.2.15release notes

  • HTTP proxy support is added to jsdom.env.

    0.2.15release notes

  • Anchor elements gain a pathname property to comply with the WHATWG standard.

    0.2.15release notes

  • Adds JSONP support.

    0.2.9release notes

  • Support was added for document.cookie.

    0.2.6release notes

  • Encoding and decoding support was added for all HTML entities from HTML4 and HTML5.

    0.2.6release notes

  • A document configuration option allows users to change the document referer.

    0.2.6release notes

  • jsdom.env() now accepts the same features object used by jsdom.jsdom and related APIs.

    0.2.6release notes

  • Support was added for reading window.location.search.

    0.2.6release notes

  • Initial support for reading and using the URL fragment through window.location.hash.

    0.2.5release notes

  • Inline event handlers such as onclick are supported.

    0.2.4release notes

  • Initial CSSOM integration was added.

    0.2.1release notes

  • DOM level configuration now accepts a string or object.

    0.2.1release notes

  • removeEventListener() was added to DOMWindow.

    0.2.1release notes

  • The download() function now supports an HTTP referrer.

    0.2.1release notes

  • HTML serialization can optionally pretty print while traversing the tree.

    0.2.1release notes

  • The encoding of the jsdom.env HTML request can now be set.

    0.2.1release notes

  • HTTP request headers can now be configured for jsdom.env.

    0.2.1release notes

  • jsdom.env now supports a src configuration option.

    0.2.1release notes

  • A DOM level can now be selected using a level number and feature string.

    0.2.1release notes

  • NodeList#indexOf was added.

    0.2.1release notes

  • window.stopTimers() was introduced as an initial attempt to fix a memory leak.

    0.2.1release notes

  • XPath support was added.

    0.2.1release notes

Performance 1

Behavior and default changes 6

  • Elements may now have non-unique ids.

    0.2.11release notes

  • Scripts injected by jsdom receive a jsdom class during serialization.

    0.2.11release notes

  • The selector engine was upgraded from sizzle 1.0 to a version roughly equivalent to 1.5.1.

    0.2.11release notes

  • Error reports now include stacktraces, giving developers more diagnostic context.

    0.2.5release notes

  • Invalid markup is reported as an error and attached to the associated element and document.

    0.2.4release notes

  • Scheme-less URLs now default to the current protocol.

    0.2.1release notes

Fixes and other changes 66

  • URL resolution now works correctly on pages containing href-less <base> tags.

    0.2.19release notes

  • cssText is accurate again after cssstyle fixed its memory problems.

    0.2.18release notes

  • style properties are accurate again after cssstyle fixed its memory problems.

    0.2.18release notes

  • Out-of-memory errors caused by cssstyle on some larger real-world pages were fixed.

    0.2.17release notes

  • Checkbox and radiobutton checked state now correctly reflects the checked attribute.

    0.2.16release notes

  • CSS style declarations now provide more accurate cssText and style properties on all elements.

    0.2.16release notes

  • The level3/xpath functionality is now included correctly.

    0.2.16release notes

  • jsdom no longer breaks when String.prototype.normalize is provided by libraries such as sugar.js.

    0.2.16release notes

  • Doctypes are no longer set as the documentElement.

    0.2.15release notes

  • HTML entities are decoded in text only when outside script and style tags.

    0.2.15release notes

  • Single-selection HTMLSelectElement instances now report type as select-one instead of select.

    0.2.15release notes

  • config.html now handles file paths containing spaces.

    0.2.14release notes

  • QuerySelector is isolated from the prototype.

    0.2.14release notes

  • Setting textContent to an empty string clears children.

    0.2.14release notes

  • Contextify simulation now works using vm.runInContext.

    0.2.14release notes

  • Removes an unused style property that caused explosions in 0.2.12 and Node 0.4.7.

    0.2.13release notes

  • The npm package no longer includes gmon.out, v8.log, or tests, reducing unnecessary distributed files.

    0.2.12release notes

  • contexify is now optional, so projects may no longer need it installed as a required dependency.

    0.2.11release notes

  • NamedNodeMap items can now be accessed via properties.

    0.2.11release notes

  • toArray and item are now non-enumerable properties on NodeList objects.

    0.2.11release notes

  • Using the :not() selector with querySelector no longer throws a ReferenceError.

    0.2.11release notes

  • Attribute event handlers on the bubbling path are now called.

    0.2.10release notes

  • DocumentFeatures now handles iframes without a src attribute.

    0.2.10release notes

  • CSSOM constructors are exposed on the dom object.

    0.2.10release notes

  • Script tag content is no longer escaped.

    0.2.10release notes

  • Assigning markup to textarea.value no longer parses it.

    0.2.10release notes

  • Fixes appendHtmlToElement behavior with the HTML5 parser.

    0.2.9release notes

  • Prevents double loading when scripts and src properties are mixed.

    0.2.9release notes

  • Fixes a bug involving the src property.

    0.2.9release notes

  • Features are properly reset after a jsdom.env invocation.

    0.2.9release notes

  • NodeList properties now enumerate like arrays.

    0.2.9release notes

  • Fixes a ReferenceError in the scanForImportRules helper function.

    0.2.9release notes

  • Fixes setting a script element's text property.

    0.2.9release notes

  • Downloaded file paths now include the URL search component.

    0.2.9release notes

  • Inline event handlers are ignored in every context except the JavaScript context.

    0.2.8release notes

  • Fixed stylesheet loading so stylesheets load correctly for developers using jsdom.

    0.2.7release notes

  • Different jsdom levels can now be used in the same process.

    0.2.6release notes

  • Mutation events for DOMAttrModified receive fixes, improving attribute-change event behavior.

    0.2.5release notes

  • Special characters are serialized like a grade A browser in element attributes.

    0.2.5release notes

  • Special characters are serialized like a grade A browser when reading or writing innerHTML.

    0.2.5release notes

  • Events now bubble up to the window object.

    0.2.5release notes

  • Changing the id attribute's nodeValue now updates the element's id.

    0.2.5release notes

  • Calling insertBefore with the same node for both parameters now does nothing.

    0.2.5release notes

  • Adding a script to an invalid or incomplete DOM now catches the error and passes it to the .env callback.

    0.2.4release notes

  • A crash is fixed when setChild fails to create a new DOM element.

    0.2.4release notes

  • Using style.setProperty now updates the style attribute.

    0.2.4release notes

  • Prevents segfaults caused by window being garbage collected prematurely; developers must manually close the window to free memory.

    0.2.3release notes

  • Parsing incomplete DOCTYPE declarations no longer causes a JavaScript error.

    0.2.2release notes

  • document.parentWindow now equals window.

    0.2.2release notes

  • Frames and iframes load and process scripts when the parent has the features enabled.

    0.2.2release notes

  • NodeLists can now have a length of 0.

    0.2.2release notes

  • Style serialization issues were fixed.

    0.2.2release notes

  • toArray now returns an empty array when given an empty NodeList.

    0.2.2release notes

  • Missing body and html tags are now inserted automatically.

    0.2.1release notes

  • Every document now has either a body or a frameset.

    0.2.1release notes

  • Doctype serialization now handles newlines correctly.

    0.2.1release notes

  • getListeners() now returns a shallow copy, allowing listeners to be safely removed during dispatch.

    0.2.1release notes

  • HTMLDecode now correctly decodes common named entities.

    0.2.1release notes

  • JavaScript errors are triggered on the script element instead of the document.

    0.2.1release notes

  • Empty scripts no longer cause jsdom.env to hang.

    0.2.1release notes

  • Node and Exception type constants are now available in all levels.

    0.2.1release notes

  • The defaultSelected field of option elements was corrected.

    0.2.1release notes

  • The selected field of option elements was corrected.

    0.2.1release notes

  • Relative and absolute URLs now work as expected.

    0.2.1release notes

  • resourceLoader.download now handles HTTPS and redirects correctly.

    0.2.1release notes

  • The title node now uses textContent, and the getter walks the DOM to extract text correctly.

    0.2.1release notes