Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Cannot read property '_location' of null #1893

Closed
Enverbalalic opened this issue Jun 21, 2017 · 1 comment
Closed

TypeError: Cannot read property '_location' of null #1893

Enverbalalic opened this issue Jun 21, 2017 · 1 comment

Comments

@Enverbalalic
Copy link
Contributor

Basic info:

NodeJS version: v6.10.3
jsdom version: jsdom@11.0.0

Minimal reproduction case

const jsdom = require("jsdom");
const { JSDOM } = jsdom;
const window = (new JSDOM(``, { runScripts: "outside-only" })).window;

window.setTimeout(function() {
        window.close();
        window.setTimeout(function () {
                window.location.href = "hello";
        }, 300);
}, 1000);

In browsers after window.close(); all pending timeouts are cleared and new ones are not set up.

@domenic
Copy link
Member

domenic commented Jun 21, 2017

Great repro code, thanks! I will investigate this as soon as I am able to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants