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 = "StyleSheetList")]
54 # [wasm_bindgen (structural , method , getter , js_class = "ShadowRoot" , js_name = styleSheets)]
55 #[doc = "Getter for the `styleSheets` field of this object."]
56 #[doc = ""]
57 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/styleSheets)"]
58 #[doc = ""]
59 #[doc = "*This API requires the following crate features to be activated: `ShadowRoot`, `StyleSheetList`*"]
60 pub fn style_sheets(this: &ShadowRoot) -> StyleSheetList;
61 #[cfg(feature = "Element")]
62 # [wasm_bindgen (structural , method , getter , js_class = "ShadowRoot" , js_name = pointerLockElement)]
63 #[doc = "Getter for the `pointerLockElement` field of this object."]
64 #[doc = ""]
65 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/pointerLockElement)"]
66 #[doc = ""]
67 #[doc = "*This API requires the following crate features to be activated: `Element`, `ShadowRoot`*"]
68 pub fn pointer_lock_element(this: &ShadowRoot) -> Option<Element>;
69 #[cfg(feature = "Element")]
70 # [wasm_bindgen (structural , method , getter , js_class = "ShadowRoot" , js_name = fullscreenElement)]
71 #[doc = "Getter for the `fullscreenElement` field of this object."]
72 #[doc = ""]
73 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/fullscreenElement)"]
74 #[doc = ""]
75 #[doc = "*This API requires the following crate features to be activated: `Element`, `ShadowRoot`*"]
76 pub fn fullscreen_element(this: &ShadowRoot) -> Option<Element>;
77 #[cfg(web_sys_unstable_apis)]
78 #[cfg(feature = "Element")]
79 # [wasm_bindgen (structural , method , getter , js_class = "ShadowRoot" , js_name = pictureInPictureElement)]
80 #[doc = "Getter for the `pictureInPictureElement` field of this object."]
81 #[doc = ""]
82 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/pictureInPictureElement)"]
83 #[doc = ""]
84 #[doc = "*This API requires the following crate features to be activated: `Element`, `ShadowRoot`*"]
85 #[doc = ""]
86 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
87 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
88 pub fn picture_in_picture_element(this: &ShadowRoot) -> Option<Element>;
89 #[cfg(feature = "Element")]
90 # [wasm_bindgen (method , structural , js_class = "ShadowRoot" , js_name = getElementById)]
91 #[doc = "The `getElementById()` method."]
92 #[doc = ""]
93 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/getElementById)"]
94 #[doc = ""]
95 #[doc = "*This API requires the following crate features to be activated: `Element`, `ShadowRoot`*"]
96 pub fn get_element_by_id(this: &ShadowRoot, element_id: &str) -> Option<Element>;
97 #[cfg(feature = "HtmlCollection")]
98 # [wasm_bindgen (method , structural , js_class = "ShadowRoot" , js_name = getElementsByClassName)]
99 #[doc = "The `getElementsByClassName()` method."]
100 #[doc = ""]
101 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/getElementsByClassName)"]
102 #[doc = ""]
103 #[doc = "*This API requires the following crate features to be activated: `HtmlCollection`, `ShadowRoot`*"]
104 pub fn get_elements_by_class_name(this: &ShadowRoot, class_names: &str) -> HtmlCollection;
105 #[cfg(feature = "HtmlCollection")]
106 # [wasm_bindgen (method , structural , js_class = "ShadowRoot" , js_name = getElementsByTagName)]
107 #[doc = "The `getElementsByTagName()` method."]
108 #[doc = ""]
109 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/getElementsByTagName)"]
110 #[doc = ""]
111 #[doc = "*This API requires the following crate features to be activated: `HtmlCollection`, `ShadowRoot`*"]
112 pub fn get_elements_by_tag_name(this: &ShadowRoot, local_name: &str) -> HtmlCollection;
113 #[cfg(feature = "HtmlCollection")]
114 # [wasm_bindgen (method , structural , js_class = "ShadowRoot" , js_name = getElementsByTagNameNS)]
115 #[doc = "The `getElementsByTagNameNS()` method."]
116 #[doc = ""]
117 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/getElementsByTagNameNS)"]
118 #[doc = ""]
119 #[doc = "*This API requires the following crate features to be activated: `HtmlCollection`, `ShadowRoot`*"]
120 pub fn get_elements_by_tag_name_ns(
121 this: &ShadowRoot,
122 namespace: Option<&str>,
123 local_name: &str,
124 ) -> HtmlCollection;
125 #[cfg(feature = "Element")]
126 # [wasm_bindgen (method , structural , js_class = "ShadowRoot" , js_name = elementFromPoint)]
127 #[doc = "The `elementFromPoint()` method."]
128 #[doc = ""]
129 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/elementFromPoint)"]
130 #[doc = ""]
131 #[doc = "*This API requires the following crate features to be activated: `Element`, `ShadowRoot`*"]
132 pub fn element_from_point(this: &ShadowRoot, x: f32, y: f32) -> Option<Element>;
133 # [wasm_bindgen (method , structural , js_class = "ShadowRoot" , js_name = elementsFromPoint)]
134 #[doc = "The `elementsFromPoint()` method."]
135 #[doc = ""]
136 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/elementsFromPoint)"]
137 #[doc = ""]
138 #[doc = "*This API requires the following crate features to be activated: `ShadowRoot`*"]
139 pub fn elements_from_point(this: &ShadowRoot, x: f32, y: f32) -> ::js_sys::Array;
140}