pub struct AddScriptToEvaluateOnNewDocumentParams {
pub source: String,
pub world_name: Option<String>,
pub include_command_line_api: Option<bool>,
pub run_immediately: Option<bool>,
}Expand description
Evaluates given script in every frame upon creation (before loading frame’s scripts).
Parameters of Page.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.
Experimental: may change without notice.
include_command_line_api: Option<bool>Specifies whether command line API should be available to the script, defaults to false.
Experimental: may change without notice.
run_immediately: Option<bool>If true, runs the script immediately on existing execution contexts or worlds. Default: false.
Experimental: may change without notice.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AddScriptToEvaluateOnNewDocumentParams
impl<'de> Deserialize<'de> for AddScriptToEvaluateOnNewDocumentParams
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
impl StructuralPartialEq for AddScriptToEvaluateOnNewDocumentParams
Auto Trait Implementations§
impl Forget for AddScriptToEvaluateOnNewDocumentParams
impl Freeze for AddScriptToEvaluateOnNewDocumentParams
impl RefUnwindSafe for AddScriptToEvaluateOnNewDocumentParams
impl Send for AddScriptToEvaluateOnNewDocumentParams
impl Sync for AddScriptToEvaluateOnNewDocumentParams
impl Unpin for AddScriptToEvaluateOnNewDocumentParams
impl UnsafeUnpin 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