pause-document icon indicating copy to clipboard operation
pause-document copied to clipboard

How is "pausing script" supposed to work?

Open bzbarsky opened this issue 8 years ago • 2 comments

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.

bzbarsky avatar Nov 02 '17 18:11 bzbarsky

I'll specify that this is targeting tasks related to the given frame in the event queue.

jkarlin avatar Nov 02 '17 19:11 jkarlin

"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?

bzbarsky avatar Nov 02 '17 19:11 bzbarsky