web_sys/features/
gen_ShadowRoot.rs

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