Skip to content

stagehand-python@4.5.0a0.dev1721

@sharvaribrowserbase sharvaribrowserbase tagged this 19 Nov 19:18
# why

- dedicated event methods let each callback receive event-specific
objects, including objects with callable methods, without adding
overloads to `page.on()`
- align console subscriptions with that API pattern

# what changed

- add `page.onConsole()` in TypeScript and `page.on_console()` in Python
- preserve `page.on("console", listener)` as a deprecated wrapper
- update documentation and add a changeset

# test plan

- unit tests cover both APIs, event delivery, and cleanup failures
- Chrome integration test verifies matching payloads, navigation, and
unsubscribe
- manually verified matching log, warning, and error events
- type checks, documentation checks, and SDK build pass
Assets 2
Loading