Skip to content

feat(page): make IPage implement IAsyncDisposable#3306

Merged
dgozman merged 1 commit intomicrosoft:mainfrom
dgozman:fix-3243
May 1, 2026
Merged

feat(page): make IPage implement IAsyncDisposable#3306
dgozman merged 1 commit intomicrosoft:mainfrom
dgozman:fix-3243

Conversation

@dgozman
Copy link
Copy Markdown
Collaborator

@dgozman dgozman commented May 1, 2026

Summary

  • IPage now implements IAsyncDisposable, so await using var page = await context.NewPageAsync(); works the same way it does for IBrowser and IBrowserContext.
  • Page.DisposeAsync simply forwards to CloseAsync, matching the one-liner already used in Browser and BrowserContext.

Fixes #3243

Mirrors IBrowserContext / IBrowser so that `await using` works on a
Page. DisposeAsync delegates to CloseAsync.

Fixes microsoft#3243
@dgozman dgozman merged commit 285a824 into microsoft:main May 1, 2026
16 checks passed
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.

[Docs]: Clarify IPage disposal (CloseAsync vs. IAsyncDisposable)

2 participants