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