web_sys/features/
gen_ShadowRoot.rs1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 #[wasm_bindgen(
8 extends = "DocumentFragment",
9 extends = "Node",
10 extends = "EventTarget",
11 extends = "::js_sys::Object",
12 js_name = "ShadowRoot",
13 typescript_type = "ShadowRoot"
14 )]
15 #[derive(Debug, Clone, PartialEq, Eq)]
16 #[doc = "The `ShadowRoot` class."]
17 #[doc = ""]
18 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot)"]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `ShadowRoot`*"]
21 pub type ShadowRoot;
22 #[cfg(feature = "ShadowRootMode")]
23 #[wasm_bindgen(method, getter, js_class = "ShadowRoot", js_name = "mode")]
24 #[doc = "Getter for the `mode` field of this object."]
25 #[doc = ""]
26 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/mode)"]
27 #[doc = ""]
28 #[doc = "*This API requires the following crate features to be activated: `ShadowRoot`, `ShadowRootMode`*"]
29 pub fn mode(this: &ShadowRoot) -> ShadowRootMode;
30 #[cfg(feature = "Element")]
31 #[wasm_bindgen(method, getter, js_class = "ShadowRoot", js_name = "host")]
32 #[doc = "Getter for the `host` field of this object."]
33 #[doc = ""]
34 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/host)"]
35 #[doc = ""]
36 #[doc = "*This API requires the following crate features to be activated: `Element`, `ShadowRoot`*"]
37 pub fn host(this: &ShadowRoot) -> Element;
38 #[wasm_bindgen(method, getter, js_class = "ShadowRoot", js_name = "innerHTML")]
39 #[doc = "Getter for the `innerHTML` field of this object."]
40 #[doc = ""]
41 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/innerHTML)"]
42 #[doc = ""]
43 #[doc = "*This API requires the following crate features to be activated: `ShadowRoot`*"]
44 pub fn inner_html(this: &ShadowRoot) -> ::alloc::string::String;
45 #[wasm_bindgen(method, setter, js_class = "ShadowRoot", js_name = "innerHTML")]
46 #[doc = "Setter for the `innerHTML` field of this object."]
47 #[doc = ""]
48 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/innerHTML)"]
49 #[doc = ""]
50 #[doc = "*This API requires the following crate features to be activated: `ShadowRoot`*"]
51 pub fn set_inner_html(this: &ShadowRoot, value: &str);
52 #[cfg(feature = "Element")]
53 #[wasm_bindgen(method, getter, js_class = "ShadowRoot", js_name = "activeElement")]
54 #[doc = "Getter for the `activeElement` field of this object."]
55 #[doc = ""]
56 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/activeElement)"]
57 #[doc = ""]
58 #[doc = "*This API requires the following crate features to be activated: `Element`, `ShadowRoot`*"]
59 pub fn active_element(this: &ShadowRoot) -> Option<Element>;
60 #[cfg(feature = "Element")]
61 #[wasm_bindgen(
62 method,
63 getter,
64 js_class = "ShadowRoot",
65 js_name = "pointerLockElement"
66 )]
67 #[doc = "Getter for the `pointerLockElement` field of this object."]
68 #[doc = ""]
69 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/pointerLockElement)"]
70 #[doc = ""]
71 #[doc = "*This API requires the following crate features to be activated: `Element`, `ShadowRoot`*"]
72 pub fn pointer_lock_element(this: &ShadowRoot) -> Option<Element>;
73 #[cfg(feature = "Element")]
74 #[wasm_bindgen(method, getter, js_class = "ShadowRoot", js_name = "fullscreenElement")]
75 #[doc = "Getter for the `fullscreenElement` field of this object."]
76 #[doc = ""]
77 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/fullscreenElement)"]
78 #[doc = ""]
79 #[doc = "*This API requires the following crate features to be activated: `Element`, `ShadowRoot`*"]
80 pub fn fullscreen_element(this: &ShadowRoot) -> Option<Element>;
81 #[cfg(feature = "StyleSheetList")]
82 #[wasm_bindgen(method, getter, js_class = "ShadowRoot", js_name = "styleSheets")]
83 #[doc = "Getter for the `styleSheets` field of this object."]
84 #[doc = ""]
85 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/styleSheets)"]
86 #[doc = ""]
87 #[doc = "*This API requires the following crate features to be activated: `ShadowRoot`, `StyleSheetList`*"]
88 pub fn style_sheets(this: &ShadowRoot) -> StyleSheetList;
89 #[wasm_bindgen(
90 method,
91 getter,
92 js_class = "ShadowRoot",
93 js_name = "adoptedStyleSheets"
94 )]
95 #[doc = "Getter for the `adoptedStyleSheets` field of this object."]
96 #[doc = ""]
97 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/adoptedStyleSheets)"]
98 #[doc = ""]
99 #[doc = "*This API requires the following crate features to be activated: `ShadowRoot`*"]
100 pub fn adopted_style_sheets(this: &ShadowRoot) -> ::js_sys::Array;
101 #[wasm_bindgen(
102 method,
103 setter,
104 js_class = "ShadowRoot",
105 js_name = "adoptedStyleSheets"
106 )]
107 #[doc = "Setter for the `adoptedStyleSheets` field of this object."]
108 #[doc = ""]
109 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/adoptedStyleSheets)"]
110 #[doc = ""]
111 #[doc = "*This API requires the following crate features to be activated: `ShadowRoot`*"]
112 pub fn set_adopted_style_sheets(this: &ShadowRoot, value: &::wasm_bindgen::JsValue);
113 #[cfg(web_sys_unstable_apis)]
114 #[cfg(feature = "Element")]
115 #[wasm_bindgen(
116 method,
117 getter,
118 js_class = "ShadowRoot",
119 js_name = "pictureInPictureElement"
120 )]
121 #[doc = "Getter for the `pictureInPictureElement` field of this object."]
122 #[doc = ""]
123 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/pictureInPictureElement)"]
124 #[doc = ""]
125 #[doc = "*This API requires the following crate features to be activated: `Element`, `ShadowRoot`*"]
126 #[doc = ""]
127 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
128 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
129 pub fn picture_in_picture_element(this: &ShadowRoot) -> Option<Element>;
130 #[cfg(feature = "Element")]
131 #[wasm_bindgen(method, js_class = "ShadowRoot", js_name = "getElementById")]
132 #[doc = "The `getElementById()` method."]
133 #[doc = ""]
134 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/getElementById)"]
135 #[doc = ""]
136 #[doc = "*This API requires the following crate features to be activated: `Element`, `ShadowRoot`*"]
137 pub fn get_element_by_id(this: &ShadowRoot, element_id: &str) -> Option<Element>;
138 #[cfg(feature = "HtmlCollection")]
139 #[wasm_bindgen(method, js_class = "ShadowRoot", js_name = "getElementsByClassName")]
140 #[doc = "The `getElementsByClassName()` method."]
141 #[doc = ""]
142 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/getElementsByClassName)"]
143 #[doc = ""]
144 #[doc = "*This API requires the following crate features to be activated: `HtmlCollection`, `ShadowRoot`*"]
145 pub fn get_elements_by_class_name(this: &ShadowRoot, class_names: &str) -> HtmlCollection;
146 #[cfg(feature = "HtmlCollection")]
147 #[wasm_bindgen(method, js_class = "ShadowRoot", js_name = "getElementsByTagName")]
148 #[doc = "The `getElementsByTagName()` method."]
149 #[doc = ""]
150 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/getElementsByTagName)"]
151 #[doc = ""]
152 #[doc = "*This API requires the following crate features to be activated: `HtmlCollection`, `ShadowRoot`*"]
153 pub fn get_elements_by_tag_name(this: &ShadowRoot, local_name: &str) -> HtmlCollection;
154 #[cfg(feature = "HtmlCollection")]
155 #[wasm_bindgen(method, js_class = "ShadowRoot", js_name = "getElementsByTagNameNS")]
156 #[doc = "The `getElementsByTagNameNS()` method."]
157 #[doc = ""]
158 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/getElementsByTagNameNS)"]
159 #[doc = ""]
160 #[doc = "*This API requires the following crate features to be activated: `HtmlCollection`, `ShadowRoot`*"]
161 pub fn get_elements_by_tag_name_ns(
162 this: &ShadowRoot,
163 namespace: Option<&str>,
164 local_name: &str,
165 ) -> HtmlCollection;
166 #[cfg(feature = "Element")]
167 #[wasm_bindgen(method, js_class = "ShadowRoot", js_name = "elementFromPoint")]
168 #[doc = "The `elementFromPoint()` method."]
169 #[doc = ""]
170 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/elementFromPoint)"]
171 #[doc = ""]
172 #[doc = "*This API requires the following crate features to be activated: `Element`, `ShadowRoot`*"]
173 pub fn element_from_point(this: &ShadowRoot, x: f32, y: f32) -> Option<Element>;
174 #[wasm_bindgen(method, js_class = "ShadowRoot", js_name = "elementsFromPoint")]
175 #[doc = "The `elementsFromPoint()` method."]
176 #[doc = ""]
177 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/elementsFromPoint)"]
178 #[doc = ""]
179 #[doc = "*This API requires the following crate features to be activated: `ShadowRoot`*"]
180 pub fn elements_from_point(this: &ShadowRoot, x: f32, y: f32) -> ::js_sys::Array;
181}