Skip to content

Commit

Permalink
Version 11.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
domenic committed Aug 21, 2017
1 parent c5cc051 commit fefa181
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 2 deletions.
23 changes: 23 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
## 11.2.0

This release brings with it a much-awaited infrastructure change, as part of [webidl2js v7.3.0](https://github.com/jsdom/webidl2js/releases/tag/v7.3.0) by the ever-amazing TimothyGu: jsdom can now generate spec-compliant versions of classes that have "`Proxy`-like" behavior, i.e. allow getting or setting keys in unusual ways. This enables a number of improvements, also by TimothyGu:

* Significantly improved the spec-compliance and "liveness" of both `NodeList` and `HTMLCollection`, such that retrieving properties via indices or (in `HTMLCollection`'s case) `id`/`name` values will always work correctly.
* Added `element.dataset` support.
* Added indexed and named access to `<select>` elements, as well as the corresponding `item()` and `namedItem()` methods.
* Added suport for `FileList` indexed properties, i.e. `fileList[i]`.
* Made `select.options` an instance of the newly-implemented `HTMLOptionsCollection`, instead of just a `HTMLCollection`.

This infrastructure will allow us to improve and implement many other similar behaviors; that work is being tracked in [#1129](https://github.com/tmpvar/jsdom/issues/1129).

In addition to these improvements to the object model, we have more work to share:

* Added no-op APIs `document.clear()`, `document.captureEvents()`, `document.releaseEvents()`, `window.external.AddSearchProvider()`, and `window.external.IsSearchProviderInstalled()`. (Zirro)
* Added active checks to prevent reentrancy in `TreeWalker` and `NodeIterator`.
* Updated the interaction between a `<textarea>`'s `value`, `defaultValue`, and `textContent` per [a recent spec change](https://github.com/whatwg/html/commit/5afbba1cf62ee01bc6af3fd220d01f3f7591a0fc)
* Fixed elements with `id="undefined"` shadowing the `undefined` property of the global object. (TimothyGu)
* Fixed matching in `getElementsByClassName()` to be ASCII case-insensitive, instead of using JavaScript's `toLowerCase()`.
* Improved some behaviors around navigating to fragments. (ForbesLindesay)
* Improved `XMLHttpRequest` and `FileReader` behavior, mainly around event handlers, `abort()`, and network errors.
* Improved edge-case spec compliance of `NodeIterator`.

## 11.1.0

* Added `javascript:` URL "navigation" via `window.location`, at least by evaluating the side effects. It still doesn't actually navigate anywhere. (ForbesLindesay)
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jsdom",
"version": "11.1.0",
"version": "11.2.0",
"description": "A JavaScript implementation of many web standards",
"keywords": [
"dom",
Expand Down

4 comments on commit fefa181

@AndrewLane
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible this version could introduce a breaking change? (I can submit an issue if necessary). We're seeing some react/enzyme tests failing with an "Illegal invocation" error. The calling code resembles this:

renderedComponent.find(SomeComponent).first().find(SomeOtherComponent).prop('onOpen')();

The tests pass with version 11.1.0.

Here is the stack trace, if it helps. I'm a bit of a noob so sorry if this is unhelpful.

    Error: Illegal invocation (/usr/src/app/node_modules/jsdom/lib/jsdom/living/generated/UIEvent.js:83)
        at el.addEventListener.event (/usr/src/app/node_modules/jsdom/lib/jsdom/living/helpers/create-event-accessor.js:25:30)
        at invokeEventListeners (/usr/src/app/node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:195:27)
        at EventTargetImpl._dispatch (/usr/src/app/node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:119:9)
        at EventTargetImpl.dispatchEvent (/usr/src/app/node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:82:17)
        at reportAnError (/usr/src/app/node_modules/jsdom/lib/jsdom/living/helpers/runtime-script-errors.js:32:12)
        at reportException (/usr/src/app/node_modules/jsdom/lib/jsdom/living/helpers/runtime-script-errors.js:59:19)
        at invokeEventListeners (/usr/src/app/node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:211:9)
        at HTMLDivElementImpl._dispatch (/usr/src/app/node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:111:7)
        at Object.exports.fireFocusEventWithTargetAdjustment (/usr/src/app/node_modules/jsdom/lib/jsdom/living/helpers/focusing.js:73:10)
        at HTMLDivElementImpl.focus (/usr/src/app/node_modules/jsdom/lib/jsdom/living/nodes/HTMLElement-impl.js:65:14)
        at HTMLDivElement.focus (/usr/src/app/node_modules/jsdom/lib/jsdom/living/generated/HTMLElement.js:49:21)

@AndrewLane
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@domenic
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please post an issue following the issue template, paying special attention to the requirements to create a minimal reproduction case with no third party libraries like React or Enzyme.

From the error message it sounds like you are doing something that would not normally work in browsers, but it could perhaps be a bug.

@AndrewLane
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I don't have the expertise to know where to begin on that without spending a great deal of time. For now, we'll just pin to the previous version.

Please sign in to comment.