How is "pausing script" supposed to work?
https://github.com/jkarlin/pause-document#pause-details says:
When script is paused, any running script task is completed and future tasks on the event queue (e.g., events (including WebSocket) and timers) remain queued until the document is unpaused.
But "the event queue" is shared by multiple documents, some of which may have script paused and some may not. This needs a much clearer explanation of how things are expected to work.
I'll specify that this is targeting tasks related to the given frame in the event queue.
"related to the given frame" will need to be defined.
For example, if script in window A does new windowB.WebSocket, are the events for that websocket related to A or B?