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 (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(feature = "Element")]
78 # [wasm_bindgen (method , structural , js_class = "ShadowRoot" , js_name = getElementById)]
79 #[doc = "The `getElementById()` method."]
80 #[doc = ""]
81 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/getElementById)"]
82 #[doc = ""]
83 #[doc = "*This API requires the following crate features to be activated: `Element`, `ShadowRoot`*"]
84 pub fn get_element_by_id(this: &ShadowRoot, element_id: &str) -> Option<Element>;
85 #[cfg(feature = "HtmlCollection")]
86 # [wasm_bindgen (method , structural , js_class = "ShadowRoot" , js_name = getElementsByClassName)]
87 #[doc = "The `getElementsByClassName()` method."]
88 #[doc = ""]
89 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/getElementsByClassName)"]
90 #[doc = ""]
91 #[doc = "*This API requires the following crate features to be activated: `HtmlCollection`, `ShadowRoot`*"]
92 pub fn get_elements_by_class_name(this: &ShadowRoot, class_names: &str) -> HtmlCollection;
93 #[cfg(feature = "HtmlCollection")]
94 # [wasm_bindgen (method , structural , js_class = "ShadowRoot" , js_name = getElementsByTagName)]
95 #[doc = "The `getElementsByTagName()` method."]
96 #[doc = ""]
97 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/getElementsByTagName)"]
98 #[doc = ""]
99 #[doc = "*This API requires the following crate features to be activated: `HtmlCollection`, `ShadowRoot`*"]
100 pub fn get_elements_by_tag_name(this: &ShadowRoot, local_name: &str) -> HtmlCollection;
101 #[cfg(feature = "HtmlCollection")]
102 # [wasm_bindgen (method , structural , js_class = "ShadowRoot" , js_name = getElementsByTagNameNS)]
103 #[doc = "The `getElementsByTagNameNS()` method."]
104 #[doc = ""]
105 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/getElementsByTagNameNS)"]
106 #[doc = ""]
107 #[doc = "*This API requires the following crate features to be activated: `HtmlCollection`, `ShadowRoot`*"]
108 pub fn get_elements_by_tag_name_ns(
109 this: &ShadowRoot,
110 namespace: Option<&str>,
111 local_name: &str,
112 ) -> HtmlCollection;
113 #[cfg(feature = "Element")]
114 # [wasm_bindgen (method , structural , js_class = "ShadowRoot" , js_name = elementFromPoint)]
115 #[doc = "The `elementFromPoint()` method."]
116 #[doc = ""]
117 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/elementFromPoint)"]
118 #[doc = ""]
119 #[doc = "*This API requires the following crate features to be activated: `Element`, `ShadowRoot`*"]
120 pub fn element_from_point(this: &ShadowRoot, x: f32, y: f32) -> Option<Element>;
121 # [wasm_bindgen (method , structural , js_class = "ShadowRoot" , js_name = elementsFromPoint)]
122 #[doc = "The `elementsFromPoint()` method."]
123 #[doc = ""]
124 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/elementsFromPoint)"]
125 #[doc = ""]
126 #[doc = "*This API requires the following crate features to be activated: `ShadowRoot`*"]
127 pub fn elements_from_point(this: &ShadowRoot, x: f32, y: f32) -> ::js_sys::Array;
128}