pub enum ContextEvent {
WebError(WebError),
Download(Download),
FrameAttached {
page: Arc<Page>,
frame_id: String,
},
FrameDetached {
page: Arc<Page>,
frame_id: String,
},
FrameNavigated {
page: Arc<Page>,
frame_id: String,
},
PageClose(Arc<Page>),
PageLoad(Arc<Page>),
}Expand description
Events emitted by browser contexts. Mirrors the subset of
Playwright’s BrowserContextEventMap that ferridriver supports:
'weberror' plus the page-lifecycle mirror events added in
Playwright 1.60 ('download', 'frameattached', 'framedetached',
'framenavigated', 'pageclose', 'pageload').
Variants§
WebError(WebError)
Unhandled error / rejection in any page in this context. Mirrors
Playwright’s browserContext.on('weberror', (webError: WebError) => ...)
from server/browserContext.ts:54.
Download(Download)
Browser-initiated download on any page in this context. Mirrors
browserContext.on('download', (download: Download) => ...).
FrameAttached
A frame attached on a page in this context. Carries the owning
page so the binding can mint a live Frame for frame_id.
Mirrors browserContext.on('frameattached', (frame: Frame) => ...).
FrameDetached
A frame detached. browserContext.on('framedetached', ...).
A frame navigated. browserContext.on('framenavigated', ...).
PageClose(Arc<Page>)
A page in this context was closed.
browserContext.on('pageclose', (page: Page) => ...).
PageLoad(Arc<Page>)
A page in this context fired load.
browserContext.on('pageload', (page: Page) => ...).
Trait Implementations§
Source§impl Clone for ContextEvent
impl Clone for ContextEvent
Source§fn clone(&self) -> ContextEvent
fn clone(&self) -> ContextEvent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more