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