pub struct AddScriptTagOptions {
pub content: Option<String>,
pub url: Option<String>,
pub path: Option<String>,
pub type_: Option<String>,
}Expand description
Options for adding a <script> tag to the page.
At least one of content, url, or path must be specified.
See: https://playwright.dev/docs/api/class-page#page-add-script-tag
Fields§
§content: Option<String>Raw JavaScript content to inject
url: Option<String>URL of the <script> tag to add
path: Option<String>Path to a JavaScript file to inject (file contents will be read and sent as content)
type_: Option<String>Script type attribute (e.g., "module")
Implementations§
Source§impl AddScriptTagOptions
impl AddScriptTagOptions
Sourcepub fn builder() -> AddScriptTagOptionsBuilder
pub fn builder() -> AddScriptTagOptionsBuilder
Creates a new builder for AddScriptTagOptions
Trait Implementations§
Source§impl Clone for AddScriptTagOptions
impl Clone for AddScriptTagOptions
Source§fn clone(&self) -> AddScriptTagOptions
fn clone(&self) -> AddScriptTagOptions
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 AddScriptTagOptions
impl Debug for AddScriptTagOptions
Source§impl Default for AddScriptTagOptions
impl Default for AddScriptTagOptions
Source§fn default() -> AddScriptTagOptions
fn default() -> AddScriptTagOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for AddScriptTagOptions
impl RefUnwindSafe for AddScriptTagOptions
impl Send for AddScriptTagOptions
impl Sync for AddScriptTagOptions
impl Unpin for AddScriptTagOptions
impl UnsafeUnpin for AddScriptTagOptions
impl UnwindSafe for AddScriptTagOptions
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