pub struct AddScriptToEvaluateOnNewDocumentParams {
pub source: String,
pub world_name: Option<String>,
pub include_command_line_api: Option<bool>,
}
Expand description
Evaluates given script in every frame upon creation (before loading frame’s scripts). addScriptToEvaluateOnNewDocument
Fields§
§source: String
§world_name: Option<String>
If specified, creates an isolated world with the given name and evaluates given script in it. This world name will be used as the ExecutionContextDescription::name when the corresponding event is emitted.
include_command_line_api: Option<bool>
Specifies whether command line API should be available to the script, defaults to false.
Implementations§
source§impl AddScriptToEvaluateOnNewDocumentParams
impl AddScriptToEvaluateOnNewDocumentParams
pub fn new(source: impl Into<String>) -> AddScriptToEvaluateOnNewDocumentParams
source§impl AddScriptToEvaluateOnNewDocumentParams
impl AddScriptToEvaluateOnNewDocumentParams
pub const IDENTIFIER: &'static str = "Page.addScriptToEvaluateOnNewDocument"
Trait Implementations§
source§impl Clone for AddScriptToEvaluateOnNewDocumentParams
impl Clone for AddScriptToEvaluateOnNewDocumentParams
source§fn clone(&self) -> AddScriptToEvaluateOnNewDocumentParams
fn clone(&self) -> AddScriptToEvaluateOnNewDocumentParams
Returns a copy 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 Command for AddScriptToEvaluateOnNewDocumentParams
impl Command for AddScriptToEvaluateOnNewDocumentParams
§type Response = AddScriptToEvaluateOnNewDocumentReturns
type Response = AddScriptToEvaluateOnNewDocumentReturns
The type of the response this request triggers on the chromium server
source§impl<'de> Deserialize<'de> for AddScriptToEvaluateOnNewDocumentParams
impl<'de> Deserialize<'de> for AddScriptToEvaluateOnNewDocumentParams
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<AddScriptToEvaluateOnNewDocumentParams, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<AddScriptToEvaluateOnNewDocumentParams, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<T> From<T> for AddScriptToEvaluateOnNewDocumentParams
impl<T> From<T> for AddScriptToEvaluateOnNewDocumentParams
source§fn from(url: T) -> AddScriptToEvaluateOnNewDocumentParams
fn from(url: T) -> AddScriptToEvaluateOnNewDocumentParams
Converts to this type from the input type.
source§impl Method for AddScriptToEvaluateOnNewDocumentParams
impl Method for AddScriptToEvaluateOnNewDocumentParams
source§fn identifier(&self) -> Cow<'static, str>
fn identifier(&self) -> Cow<'static, str>
The whole string identifier for this method like:
DOM.removeNode
source§fn domain_name(&self) -> Cow<'static, str>
fn domain_name(&self) -> Cow<'static, str>
The name of the domain this method belongs to:
DOM
source§fn method_name(&self) -> Cow<'static, str>
fn method_name(&self) -> Cow<'static, str>
The standalone identifier of the method inside the domain:
removeNode
source§impl PartialEq for AddScriptToEvaluateOnNewDocumentParams
impl PartialEq for AddScriptToEvaluateOnNewDocumentParams
source§fn eq(&self, other: &AddScriptToEvaluateOnNewDocumentParams) -> bool
fn eq(&self, other: &AddScriptToEvaluateOnNewDocumentParams) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for AddScriptToEvaluateOnNewDocumentParams
impl Serialize for AddScriptToEvaluateOnNewDocumentParams
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for AddScriptToEvaluateOnNewDocumentParams
Auto Trait Implementations§
impl Freeze for AddScriptToEvaluateOnNewDocumentParams
impl RefUnwindSafe for AddScriptToEvaluateOnNewDocumentParams
impl Send for AddScriptToEvaluateOnNewDocumentParams
impl Sync for AddScriptToEvaluateOnNewDocumentParams
impl Unpin for AddScriptToEvaluateOnNewDocumentParams
impl UnwindSafe for AddScriptToEvaluateOnNewDocumentParams
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