pub struct JavascriptDialogOpeningEvent { /* private fields */ }
Available on crate features
Page
and Debugger
and DOM
and IO
and Network
and Runtime
only.Expand description
Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) is about to open.
Implementations§
Source§impl JavascriptDialogOpeningEvent
impl JavascriptDialogOpeningEvent
pub fn builder() -> JavascriptDialogOpeningEventBuilder
Sourcepub fn type(&self) -> &DialogType
pub fn type(&self) -> &DialogType
Dialog type.
Sourcepub fn has_browser_handler(&self) -> bool
pub fn has_browser_handler(&self) -> bool
True iff browser is capable showing or acting on the given dialog. When browser has no dialog handler for given target, calling alert while Page domain is engaged will stall the page execution. Execution can be resumed via calling Page.handleJavaScriptDialog.
Sourcepub fn default_prompt(&self) -> Option<&String>
pub fn default_prompt(&self) -> Option<&String>
Default dialog prompt.
Trait Implementations§
Source§impl Clone for JavascriptDialogOpeningEvent
impl Clone for JavascriptDialogOpeningEvent
Source§fn clone(&self) -> JavascriptDialogOpeningEvent
fn clone(&self) -> JavascriptDialogOpeningEvent
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for JavascriptDialogOpeningEvent
impl Debug for JavascriptDialogOpeningEvent
Source§impl<'de> Deserialize<'de> for JavascriptDialogOpeningEvent
impl<'de> Deserialize<'de> for JavascriptDialogOpeningEvent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for JavascriptDialogOpeningEvent
impl RefUnwindSafe for JavascriptDialogOpeningEvent
impl Send for JavascriptDialogOpeningEvent
impl Sync for JavascriptDialogOpeningEvent
impl Unpin for JavascriptDialogOpeningEvent
impl UnwindSafe for JavascriptDialogOpeningEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more