Skip to content

Commit

Permalink
HashChangeEvent and PopStateEvent should no longer bubble
Browse files Browse the repository at this point in the history
  • Loading branch information
Zirro authored and domenic committed Jul 25, 2018
1 parent f1270e7 commit 2761d3c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/jsdom/living/window/SessionHistory.js
Expand Up @@ -144,7 +144,7 @@ class SessionHistory {
this._windowImpl._dispatch(PopStateEvent.createImpl([
"popstate",
{
bubbles: true,
bubbles: false,
state
}
], {
Expand All @@ -156,7 +156,7 @@ class SessionHistory {
this._windowImpl._dispatch(HashChangeEvent.createImpl([
"hashchange",
{
bubbles: true,
bubbles: false,
oldURL: whatwgURL.serializeURL(oldURL),
newURL: whatwgURL.serializeURL(newURL)
}
Expand Down
2 changes: 1 addition & 1 deletion test/to-port-to-wpts/history.js
Expand Up @@ -183,7 +183,7 @@ describe("history", () => {
const state = { foo: "bar" };

window.addEventListener("popstate", event => {
assert.strictEqual(event.bubbles, true);
assert.strictEqual(event.bubbles, false);
assert.strictEqual(event.cancelable, false);
assert.strictEqual(event.state, state);

Expand Down
4 changes: 2 additions & 2 deletions test/to-port-to-wpts/location.js
Expand Up @@ -62,7 +62,7 @@ describe("location", () => {
url: "http://www.example.com"
}).defaultView;
window.addEventListener("hashchange", event => {
assert.strictEqual(event.bubbles, true);
assert.strictEqual(event.bubbles, false);
assert.strictEqual(event.cancelable, false);
assert.strictEqual(event.oldURL, "http://www.example.com/");
assert.strictEqual(event.newURL, "http://www.example.com/#foo");
Expand All @@ -85,7 +85,7 @@ describe("location", () => {
url: "http://www.example.com"
}).defaultView;
window.addEventListener("hashchange", event => {
assert.strictEqual(event.bubbles, true);
assert.strictEqual(event.bubbles, false);
assert.strictEqual(event.cancelable, false);
assert.strictEqual(event.oldURL, "http://www.example.com/");
assert.strictEqual(event.newURL, "http://www.example.com/#foo");
Expand Down

0 comments on commit 2761d3c

Please sign in to comment.