Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Implement polyfill for JSDOM
  • Loading branch information
armanbilge committed Sep 7, 2021
commit df0689ba6bbeedd4211ea362f711b18a0e7db424
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,13 @@ object MacrotaskExecutor extends ExecutionContextExecutor {
channel.port2.postMessage(handle)
()
}
} else if (js.typeOf(js.Dynamic.global.Node) != Undefined) { // JSDOM sandbox
val setImmediate = js.Dynamic.global.Node.constructor("return setImmediate")()

{ k =>
setImmediate(k)
()
}
} else {
// we don't try to look for process.nextTick since scalajs doesn't support old node
// we're also not going to bother fast-pathing for IE6; just fall through
Expand Down