pub struct FrameManager { /* private fields */ }Expand description
Maintains the state of the pages frame and listens to events produced by
chromium targeting the Target. Also listens for events that indicate that
a navigation was completed
Implementations§
Source§impl FrameManager
impl FrameManager
pub fn new(request_timeout: Duration) -> Self
Sourcepub fn init_commands(timeout: Duration) -> CommandChain
pub fn init_commands(timeout: Duration) -> CommandChain
The commands to execute in order to initialize this frame manager
pub fn main_frame(&self) -> Option<&Frame>
pub fn main_frame_mut(&mut self) -> Option<&mut Frame>
Sourcepub fn get_isolated_world_name(&self) -> Option<&String>
pub fn get_isolated_world_name(&self) -> Option<&String>
Get the main isolated world name.
pub fn frames(&self) -> impl Iterator<Item = &Frame> + '_
pub fn frame(&self, id: &FrameId) -> Option<&Frame>
Sourcepub fn on_http_request_finished(&mut self, request: HttpRequest)
pub fn on_http_request_finished(&mut self, request: HttpRequest)
Track the request in the frame
pub fn poll(&mut self, now: Instant) -> Option<FrameEvent>
Sourcepub fn goto(&mut self, req: FrameRequestedNavigation)
pub fn goto(&mut self, req: FrameRequestedNavigation)
Entrypoint for page navigation
Navigate a specific frame
Sourcepub fn on_attached_to_target(&mut self, _event: &EventAttachedToTarget)
pub fn on_attached_to_target(&mut self, _event: &EventAttachedToTarget)
Fired when a frame moved to another session
pub fn on_frame_tree(&mut self, frame_tree: FrameTree)
pub fn on_frame_attached( &mut self, frame_id: FrameId, parent_frame_id: Option<FrameId>, )
pub fn on_frame_detached(&mut self, event: &EventFrameDetached)
pub fn on_frame_stopped_loading(&mut self, event: &EventFrameStoppedLoading)
Sourcepub fn on_frame_started_loading(&mut self, event: &EventFrameStartedLoading)
pub fn on_frame_started_loading(&mut self, event: &EventFrameStartedLoading)
Fired when frame has started loading.
Sourcepub fn on_runtime_binding_called(&mut self, _ev: &EventBindingCalled)
pub fn on_runtime_binding_called(&mut self, _ev: &EventBindingCalled)
Notification is issued every time when binding is called
Sourcepub fn on_frame_execution_context_created(
&mut self,
event: &EventExecutionContextCreated,
)
pub fn on_frame_execution_context_created( &mut self, event: &EventExecutionContextCreated, )
Issued when new execution context is created
Sourcepub fn on_frame_execution_context_destroyed(
&mut self,
event: &EventExecutionContextDestroyed,
)
pub fn on_frame_execution_context_destroyed( &mut self, event: &EventExecutionContextDestroyed, )
Issued when execution context is destroyed
Sourcepub fn on_execution_contexts_cleared(&mut self)
pub fn on_execution_contexts_cleared(&mut self)
Issued when all executionContexts were cleared
Sourcepub fn evict_stale_context_ids(&mut self)
pub fn evict_stale_context_ids(&mut self)
Remove context_ids entries that reference frames which no longer
exist. Called periodically from the handler’s eviction tick — a
single O(n) pass instead of per-frame cleanup during recursive removal.
Sourcepub fn on_page_lifecycle_event(&mut self, event: &EventLifecycleEvent)
pub fn on_page_lifecycle_event(&mut self, event: &EventLifecycleEvent)
Fired for top level page lifecycle events (nav, load, paint, etc.)