chromiumoxide::handler::frame

Struct FrameManager

Source
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

Source

pub fn new(request_timeout: Duration) -> Self

Source

pub fn init_commands(timeout: Duration) -> CommandChain

The commands to execute in order to initialize this frame manager

Source

pub fn main_frame(&self) -> Option<&Frame>

Source

pub fn main_frame_mut(&mut self) -> Option<&mut Frame>

Source

pub fn frames(&self) -> impl Iterator<Item = &Frame> + '_

Source

pub fn frame(&self, id: &FrameId) -> Option<&Frame>

Source

pub fn on_http_request_finished(&mut self, request: HttpRequest)

Track the request in the frame

Source

pub fn poll(&mut self, now: Instant) -> Option<FrameEvent>

Source

pub fn goto(&mut self, req: FrameRequestedNavigation)

Entrypoint for page navigation

Source

pub fn navigate_frame( &mut self, frame_id: FrameId, req: FrameRequestedNavigation, )

Navigate a specific frame

Source

pub fn on_attached_to_target(&mut self, _event: &EventAttachedToTarget)

Fired when a frame moved to another session

Source

pub fn on_frame_tree(&mut self, frame_tree: FrameTree)

Source

pub fn on_frame_attached( &mut self, frame_id: FrameId, parent_frame_id: Option<FrameId>, )

Source

pub fn on_frame_detached(&mut self, event: &EventFrameDetached)

Source

pub fn on_frame_navigated(&mut self, frame: &CdpFrame)

Source

pub fn on_frame_navigated_within_document( &mut self, event: &EventNavigatedWithinDocument, )

Source

pub fn on_frame_stopped_loading(&mut self, event: &EventFrameStoppedLoading)

Source

pub fn on_frame_started_loading(&mut self, event: &EventFrameStartedLoading)

Fired when frame has started loading.

Source

pub fn on_runtime_binding_called(&mut self, _ev: &EventBindingCalled)

Notification is issued every time when binding is called

Source

pub fn on_frame_execution_context_created( &mut self, event: &EventExecutionContextCreated, )

Issued when new execution context is created

Source

pub fn on_frame_execution_context_destroyed( &mut self, event: &EventExecutionContextDestroyed, )

Issued when execution context is destroyed

Source

pub fn on_execution_contexts_cleared(&mut self)

Issued when all executionContexts were cleared

Source

pub fn on_page_lifecycle_event(&mut self, event: &EventLifecycleEvent)

Fired for top level page lifecycle events (nav, load, paint, etc.)

Source

pub fn ensure_isolated_world( &mut self, world_name: &str, ) -> Option<CommandChain>

Trait Implementations§

Source§

impl Debug for FrameManager

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T