If any switches are async, the subsequent code will execute before the switches are finished. This PR moves all that code to a new function, and debounces the calls to onSwitch() so it only executes once, after all the switches finish. Fizes #72.
7 lines
125 B
JavaScript
7 lines
125 B
JavaScript
var jsdomOptions = {
|
|
url: "https://example.org/",
|
|
runScripts: "dangerously"
|
|
}
|
|
|
|
require("jsdom-global")("", jsdomOptions)
|