Skip to content

feat: Add pre/post launch hooks to BrowserPool#1879

Merged
vdusek merged 2 commits intoapify:masterfrom
Mantisus:launch-hooks
May 7, 2026
Merged

feat: Add pre/post launch hooks to BrowserPool#1879
vdusek merged 2 commits intoapify:masterfrom
Mantisus:launch-hooks

Conversation

@Mantisus
Copy link
Copy Markdown
Collaborator

@Mantisus Mantisus commented May 6, 2026

Description

Add two browser launch hooks to BrowserPool registered as decorators:

  • pre_launch_hook - called before a new browser is launched.
  • post_launch_hook - called after a new browser is launched, receives the newly created BrowserController. If the hook raises, the browser is closed before the error is propagated.

Issues

Testing

  • Added new tests for BrowserPool.

@Mantisus Mantisus self-assigned this May 6, 2026
@Mantisus Mantisus requested a review from vdusek May 6, 2026 23:39
Copy link
Copy Markdown
Collaborator

@vdusek vdusek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did just minor polishment, otherwise LGTM

@vdusek vdusek merged commit 00ffb7e into apify:master May 7, 2026
30 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.

Add post-navigation hooks and browser lifecycle hooks

3 participants