-
Notifications
You must be signed in to change notification settings - Fork 10k
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
Don't dispatch "pageclose" events if a "pageopen" wasn't dispatched for the page (PR 12747 follow-up) #12820
Conversation
/botio-linux preview |
From: Bot.io (Linux m4)ReceivedCommand cmd_preview from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.67.70.0:8877/0c4b031046a29a3/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.67.70.0:8877/0c4b031046a29a3/output.txt Total script time: 4.11 mins Published |
3204cbd
to
0dac9d8
Compare
…or the page (PR 12747 follow-up) Given that "pageopen" events are not guaranteed to occur, if the page becomes inactive *before* it finishes rendering, we should probably also avoid dispatching a "pageclose" event in that case to avoid confusing/inconsistent state in any event handlers.
…wer._initializeScriptingEvents` (PR 12747 follow-up) With the code dispatching a "pageopen" event on the existing (general) `BaseViewer` event "pagesinit", in practice this means that the `Set` is always being created. Hence we can simplify the method overall, by always initializing the `this._pageOpenPendingSet` property.
0dac9d8
to
3732301
Compare
/botio-linux preview |
From: Bot.io (Linux m4)ReceivedCommand cmd_preview from @timvandermeij received. Current queue size: 0 Live output at: http://54.67.70.0:8877/fa3599326cbfc2b/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.67.70.0:8877/fa3599326cbfc2b/output.txt Total script time: 4.11 mins Published |
Thanks! |
Given that "pageopen" events are not guaranteed to occur, if the page becomes inactive before it finishes rendering, we should probably also avoid dispatching a "pageclose" event in that case to avoid confusing/inconsistent state in any event handlers.