fix(extension): stateless SW, pull tab state instead of ports (#596)
* feat(extension)!: make sw stateless; tabs update with pulling instead of pushing * fix(extension): harden tab loading wait * fix: safer `waitUntil` * chore: comments * chore: reduce polling logs
This commit is contained in:
@@ -64,9 +64,11 @@ export class MultiPageAgent extends PageAgentCore {
|
||||
},
|
||||
|
||||
onBeforeStep: async (agent) => {
|
||||
// pull latest tab state so that tabs changes can be observed
|
||||
await tabsController.syncTabs()
|
||||
if (!tabsController.currentTabId) return
|
||||
// make sure the current tab is loaded before the step starts
|
||||
await tabsController.waitUntilTabLoaded(tabsController.currentTabId!)
|
||||
await tabsController.waitUntilTabLoaded(tabsController.currentTabId)
|
||||
},
|
||||
|
||||
onDispose: () => {
|
||||
|
||||
Reference in New Issue
Block a user