Re: [whatwg/streams] Roll WPT for abort reason (PR #1189)

Hmm, tests are now passing, but the `_pageShowingFlag` thingy still shows up in the logs... 😕

I believe what's happening is that wpt-runner [calls `window.close()`](https://github.com/domenic/wpt-runner/blob/v4.0.0/lib/wpt-runner.js#L222) *before* the `load` event fires on that `window`. That means that jsdom has already [deleted `window._document`](https://github.com/jsdom/jsdom/blob/18.1.1/lib/jsdom/browser/Window.js#L773) by the time it tries to [handle the `load` event](https://github.com/jsdom/jsdom/blob/18.1.1/lib/jsdom/browser/Window.js#L914).

The easiest solution is probably to add an `if (!window._document) { return }` statement right before [this line](https://github.com/jsdom/jsdom/blob/18.1.1/lib/jsdom/browser/Window.js#L912). I *think* that aligns with step 9.2 of [13.2.7 The end](https://html.spec.whatwg.org/multipage/parsing.html#the-end)?
> 2. If the `Document` object's browsing context is null, then abort these steps.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/pull/1189#issuecomment-978393211

Received on Wednesday, 24 November 2021 22:51:16 UTC