Skip to main content

web_sys/features/
gen_BrowserElementExecuteScriptOptions.rs

1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7    #[wasm_bindgen(
8        extends = "::js_sys::Object",
9        js_name = "BrowserElementExecuteScriptOptions"
10    )]
11    #[derive(Debug, Clone, PartialEq, Eq)]
12    #[doc = "The `BrowserElementExecuteScriptOptions` dictionary."]
13    #[doc = ""]
14    #[doc = "*This API requires the following crate features to be activated: `BrowserElementExecuteScriptOptions`*"]
15    pub type BrowserElementExecuteScriptOptions;
16    #[doc = "Get the `origin` field of this object."]
17    #[doc = ""]
18    #[doc = "*This API requires the following crate features to be activated: `BrowserElementExecuteScriptOptions`*"]
19    #[wasm_bindgen(method, getter = "origin")]
20    pub fn get_origin(this: &BrowserElementExecuteScriptOptions)
21        -> Option<::alloc::string::String>;
22    #[doc = "Change the `origin` field of this object."]
23    #[doc = ""]
24    #[doc = "*This API requires the following crate features to be activated: `BrowserElementExecuteScriptOptions`*"]
25    #[wasm_bindgen(method, setter = "origin")]
26    pub fn set_origin(this: &BrowserElementExecuteScriptOptions, val: Option<&str>);
27    #[doc = "Get the `url` field of this object."]
28    #[doc = ""]
29    #[doc = "*This API requires the following crate features to be activated: `BrowserElementExecuteScriptOptions`*"]
30    #[wasm_bindgen(method, getter = "url")]
31    pub fn get_url(this: &BrowserElementExecuteScriptOptions) -> Option<::alloc::string::String>;
32    #[doc = "Change the `url` field of this object."]
33    #[doc = ""]
34    #[doc = "*This API requires the following crate features to be activated: `BrowserElementExecuteScriptOptions`*"]
35    #[wasm_bindgen(method, setter = "url")]
36    pub fn set_url(this: &BrowserElementExecuteScriptOptions, val: Option<&str>);
37}
38impl BrowserElementExecuteScriptOptions {
39    #[doc = "Construct a new `BrowserElementExecuteScriptOptions`."]
40    #[doc = ""]
41    #[doc = "*This API requires the following crate features to be activated: `BrowserElementExecuteScriptOptions`*"]
42    pub fn new() -> Self {
43        #[allow(unused_mut)]
44        let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
45        ret
46    }
47    #[deprecated = "Use `set_origin()` instead."]
48    pub fn origin(&mut self, val: Option<&str>) -> &mut Self {
49        self.set_origin(val);
50        self
51    }
52    #[deprecated = "Use `set_url()` instead."]
53    pub fn url(&mut self, val: Option<&str>) -> &mut Self {
54        self.set_url(val);
55        self
56    }
57}
58impl Default for BrowserElementExecuteScriptOptions {
59    fn default() -> Self {
60        Self::new()
61    }
62}