Skip to content

fix(binding): do not fail when the page was closed before the binding result arrived - #2022

Open
Yury Semikhatsky (yury-s) wants to merge 2 commits into
microsoft:mainfrom
yury-s:fix-binding-closed-page
Open

Yury Semikhatsky (yury-s) wants to merge 2 commits into
microsoft:mainfrom
yury-s:fix-binding-closed-page

Conversation

@yury-s

Copy link
Copy Markdown
Member

Summary

  • The result of a binding call was sent with a blocking sendMessage, which threw when the page had closed in the meantime and failed the enclosing call; send it asynchronously like the Node.js client.
  • Test in TestBrowserContextExposeFunction.

https://claude.ai/code/session_018p7xPf3r5VjAM7V46nzFTM

… result arrived

Like the Node.js client, the result of a binding call is sent without waiting for the driver's
answer, so a page that closed in the meantime does not fail the event dispatch.

Claude-Session: https://claude.ai/code/session_018p7xPf3r5VjAM7V46nzFTM

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant