maxcountryman_web_sys/features/
gen_HtmlOptionElement.rs

1#![allow(unused_imports)]
2use super::*;
3use wasm_bindgen::prelude::*;
4#[wasm_bindgen]
5extern "C" {
6    # [wasm_bindgen (extends = HtmlElement , extends = Element , extends = Node , extends = EventTarget , extends = :: js_sys :: Object , js_name = HTMLOptionElement , typescript_type = "HTMLOptionElement")]
7    #[derive(Debug, Clone, PartialEq, Eq)]
8    #[doc = "The `HtmlOptionElement` class."]
9    #[doc = ""]
10    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLOptionElement)"]
11    #[doc = ""]
12    #[doc = "*This API requires the following crate features to be activated: `HtmlOptionElement`*"]
13    pub type HtmlOptionElement;
14    # [wasm_bindgen (structural , method , getter , js_class = "HTMLOptionElement" , js_name = disabled)]
15    #[doc = "Getter for the `disabled` field of this object."]
16    #[doc = ""]
17    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLOptionElement/disabled)"]
18    #[doc = ""]
19    #[doc = "*This API requires the following crate features to be activated: `HtmlOptionElement`*"]
20    pub fn disabled(this: &HtmlOptionElement) -> bool;
21    # [wasm_bindgen (structural , method , setter , js_class = "HTMLOptionElement" , js_name = disabled)]
22    #[doc = "Setter for the `disabled` field of this object."]
23    #[doc = ""]
24    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLOptionElement/disabled)"]
25    #[doc = ""]
26    #[doc = "*This API requires the following crate features to be activated: `HtmlOptionElement`*"]
27    pub fn set_disabled(this: &HtmlOptionElement, value: bool);
28    #[cfg(feature = "HtmlFormElement")]
29    # [wasm_bindgen (structural , method , getter , js_class = "HTMLOptionElement" , js_name = form)]
30    #[doc = "Getter for the `form` field of this object."]
31    #[doc = ""]
32    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLOptionElement/form)"]
33    #[doc = ""]
34    #[doc = "*This API requires the following crate features to be activated: `HtmlFormElement`, `HtmlOptionElement`*"]
35    pub fn form(this: &HtmlOptionElement) -> Option<HtmlFormElement>;
36    # [wasm_bindgen (structural , method , getter , js_class = "HTMLOptionElement" , js_name = label)]
37    #[doc = "Getter for the `label` field of this object."]
38    #[doc = ""]
39    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLOptionElement/label)"]
40    #[doc = ""]
41    #[doc = "*This API requires the following crate features to be activated: `HtmlOptionElement`*"]
42    pub fn label(this: &HtmlOptionElement) -> String;
43    # [wasm_bindgen (structural , method , setter , js_class = "HTMLOptionElement" , js_name = label)]
44    #[doc = "Setter for the `label` field of this object."]
45    #[doc = ""]
46    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLOptionElement/label)"]
47    #[doc = ""]
48    #[doc = "*This API requires the following crate features to be activated: `HtmlOptionElement`*"]
49    pub fn set_label(this: &HtmlOptionElement, value: &str);
50    # [wasm_bindgen (structural , method , getter , js_class = "HTMLOptionElement" , js_name = defaultSelected)]
51    #[doc = "Getter for the `defaultSelected` field of this object."]
52    #[doc = ""]
53    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLOptionElement/defaultSelected)"]
54    #[doc = ""]
55    #[doc = "*This API requires the following crate features to be activated: `HtmlOptionElement`*"]
56    pub fn default_selected(this: &HtmlOptionElement) -> bool;
57    # [wasm_bindgen (structural , method , setter , js_class = "HTMLOptionElement" , js_name = defaultSelected)]
58    #[doc = "Setter for the `defaultSelected` field of this object."]
59    #[doc = ""]
60    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLOptionElement/defaultSelected)"]
61    #[doc = ""]
62    #[doc = "*This API requires the following crate features to be activated: `HtmlOptionElement`*"]
63    pub fn set_default_selected(this: &HtmlOptionElement, value: bool);
64    # [wasm_bindgen (structural , method , getter , js_class = "HTMLOptionElement" , js_name = selected)]
65    #[doc = "Getter for the `selected` field of this object."]
66    #[doc = ""]
67    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLOptionElement/selected)"]
68    #[doc = ""]
69    #[doc = "*This API requires the following crate features to be activated: `HtmlOptionElement`*"]
70    pub fn selected(this: &HtmlOptionElement) -> bool;
71    # [wasm_bindgen (structural , method , setter , js_class = "HTMLOptionElement" , js_name = selected)]
72    #[doc = "Setter for the `selected` field of this object."]
73    #[doc = ""]
74    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLOptionElement/selected)"]
75    #[doc = ""]
76    #[doc = "*This API requires the following crate features to be activated: `HtmlOptionElement`*"]
77    pub fn set_selected(this: &HtmlOptionElement, value: bool);
78    # [wasm_bindgen (structural , method , getter , js_class = "HTMLOptionElement" , js_name = value)]
79    #[doc = "Getter for the `value` field of this object."]
80    #[doc = ""]
81    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLOptionElement/value)"]
82    #[doc = ""]
83    #[doc = "*This API requires the following crate features to be activated: `HtmlOptionElement`*"]
84    pub fn value(this: &HtmlOptionElement) -> String;
85    # [wasm_bindgen (structural , method , setter , js_class = "HTMLOptionElement" , js_name = value)]
86    #[doc = "Setter for the `value` field of this object."]
87    #[doc = ""]
88    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLOptionElement/value)"]
89    #[doc = ""]
90    #[doc = "*This API requires the following crate features to be activated: `HtmlOptionElement`*"]
91    pub fn set_value(this: &HtmlOptionElement, value: &str);
92    # [wasm_bindgen (structural , method , getter , js_class = "HTMLOptionElement" , js_name = text)]
93    #[doc = "Getter for the `text` field of this object."]
94    #[doc = ""]
95    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLOptionElement/text)"]
96    #[doc = ""]
97    #[doc = "*This API requires the following crate features to be activated: `HtmlOptionElement`*"]
98    pub fn text(this: &HtmlOptionElement) -> String;
99    # [wasm_bindgen (structural , method , setter , js_class = "HTMLOptionElement" , js_name = text)]
100    #[doc = "Setter for the `text` field of this object."]
101    #[doc = ""]
102    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLOptionElement/text)"]
103    #[doc = ""]
104    #[doc = "*This API requires the following crate features to be activated: `HtmlOptionElement`*"]
105    pub fn set_text(this: &HtmlOptionElement, value: &str);
106    # [wasm_bindgen (structural , method , getter , js_class = "HTMLOptionElement" , js_name = index)]
107    #[doc = "Getter for the `index` field of this object."]
108    #[doc = ""]
109    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLOptionElement/index)"]
110    #[doc = ""]
111    #[doc = "*This API requires the following crate features to be activated: `HtmlOptionElement`*"]
112    pub fn index(this: &HtmlOptionElement) -> i32;
113    #[wasm_bindgen(catch, constructor, js_class = "Option")]
114    #[doc = "The `new HtmlOptionElement(..)` constructor, creating a new instance of `HtmlOptionElement`."]
115    #[doc = ""]
116    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLOptionElement/HTMLOptionElement)"]
117    #[doc = ""]
118    #[doc = "*This API requires the following crate features to be activated: `HtmlOptionElement`*"]
119    pub fn new() -> Result<HtmlOptionElement, JsValue>;
120    #[wasm_bindgen(catch, constructor, js_class = "Option")]
121    #[doc = "The `new HtmlOptionElement(..)` constructor, creating a new instance of `HtmlOptionElement`."]
122    #[doc = ""]
123    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLOptionElement/HTMLOptionElement)"]
124    #[doc = ""]
125    #[doc = "*This API requires the following crate features to be activated: `HtmlOptionElement`*"]
126    pub fn new_with_text(text: &str) -> Result<HtmlOptionElement, JsValue>;
127    #[wasm_bindgen(catch, constructor, js_class = "Option")]
128    #[doc = "The `new HtmlOptionElement(..)` constructor, creating a new instance of `HtmlOptionElement`."]
129    #[doc = ""]
130    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLOptionElement/HTMLOptionElement)"]
131    #[doc = ""]
132    #[doc = "*This API requires the following crate features to be activated: `HtmlOptionElement`*"]
133    pub fn new_with_text_and_value(text: &str, value: &str) -> Result<HtmlOptionElement, JsValue>;
134    #[wasm_bindgen(catch, constructor, js_class = "Option")]
135    #[doc = "The `new HtmlOptionElement(..)` constructor, creating a new instance of `HtmlOptionElement`."]
136    #[doc = ""]
137    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLOptionElement/HTMLOptionElement)"]
138    #[doc = ""]
139    #[doc = "*This API requires the following crate features to be activated: `HtmlOptionElement`*"]
140    pub fn new_with_text_and_value_and_default_selected(
141        text: &str,
142        value: &str,
143        default_selected: bool,
144    ) -> Result<HtmlOptionElement, JsValue>;
145    #[wasm_bindgen(catch, constructor, js_class = "Option")]
146    #[doc = "The `new HtmlOptionElement(..)` constructor, creating a new instance of `HtmlOptionElement`."]
147    #[doc = ""]
148    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLOptionElement/HTMLOptionElement)"]
149    #[doc = ""]
150    #[doc = "*This API requires the following crate features to be activated: `HtmlOptionElement`*"]
151    pub fn new_with_text_and_value_and_default_selected_and_selected(
152        text: &str,
153        value: &str,
154        default_selected: bool,
155        selected: bool,
156    ) -> Result<HtmlOptionElement, JsValue>;
157}