web_sys/features/
gen_CssStyleDeclaration.rs1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 #[wasm_bindgen(
8 extends = "::js_sys::Object",
9 js_name = "CSSStyleDeclaration",
10 typescript_type = "CSSStyleDeclaration"
11 )]
12 #[derive(Debug, Clone, PartialEq, Eq)]
13 #[doc = "The `CssStyleDeclaration` class."]
14 #[doc = ""]
15 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleDeclaration)"]
16 #[doc = ""]
17 #[doc = "*This API requires the following crate features to be activated: `CssStyleDeclaration`*"]
18 pub type CssStyleDeclaration;
19 #[wasm_bindgen(method, getter, js_class = "CSSStyleDeclaration", js_name = "cssText")]
20 #[doc = "Getter for the `cssText` field of this object."]
21 #[doc = ""]
22 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleDeclaration/cssText)"]
23 #[doc = ""]
24 #[doc = "*This API requires the following crate features to be activated: `CssStyleDeclaration`*"]
25 pub fn css_text(this: &CssStyleDeclaration) -> ::alloc::string::String;
26 #[wasm_bindgen(method, setter, js_class = "CSSStyleDeclaration", js_name = "cssText")]
27 #[doc = "Setter for the `cssText` field of this object."]
28 #[doc = ""]
29 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleDeclaration/cssText)"]
30 #[doc = ""]
31 #[doc = "*This API requires the following crate features to be activated: `CssStyleDeclaration`*"]
32 pub fn set_css_text(this: &CssStyleDeclaration, value: &str);
33 #[wasm_bindgen(method, getter, js_class = "CSSStyleDeclaration", js_name = "length")]
34 #[doc = "Getter for the `length` field of this object."]
35 #[doc = ""]
36 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleDeclaration/length)"]
37 #[doc = ""]
38 #[doc = "*This API requires the following crate features to be activated: `CssStyleDeclaration`*"]
39 pub fn length(this: &CssStyleDeclaration) -> u32;
40 #[cfg(feature = "CssRule")]
41 #[wasm_bindgen(
42 method,
43 getter,
44 js_class = "CSSStyleDeclaration",
45 js_name = "parentRule"
46 )]
47 #[doc = "Getter for the `parentRule` field of this object."]
48 #[doc = ""]
49 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleDeclaration/parentRule)"]
50 #[doc = ""]
51 #[doc = "*This API requires the following crate features to be activated: `CssRule`, `CssStyleDeclaration`*"]
52 pub fn parent_rule(this: &CssStyleDeclaration) -> Option<CssRule>;
53 #[wasm_bindgen(
54 method,
55 js_class = "CSSStyleDeclaration",
56 js_name = "getPropertyPriority"
57 )]
58 #[doc = "The `getPropertyPriority()` method."]
59 #[doc = ""]
60 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleDeclaration/getPropertyPriority)"]
61 #[doc = ""]
62 #[doc = "*This API requires the following crate features to be activated: `CssStyleDeclaration`*"]
63 pub fn get_property_priority(
64 this: &CssStyleDeclaration,
65 property: &str,
66 ) -> ::alloc::string::String;
67 #[wasm_bindgen(
68 catch,
69 method,
70 js_class = "CSSStyleDeclaration",
71 js_name = "getPropertyValue"
72 )]
73 #[doc = "The `getPropertyValue()` method."]
74 #[doc = ""]
75 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleDeclaration/getPropertyValue)"]
76 #[doc = ""]
77 #[doc = "*This API requires the following crate features to be activated: `CssStyleDeclaration`*"]
78 pub fn get_property_value(
79 this: &CssStyleDeclaration,
80 property: &str,
81 ) -> Result<::alloc::string::String, JsValue>;
82 #[wasm_bindgen(method, js_class = "CSSStyleDeclaration")]
83 #[doc = "The `item()` method."]
84 #[doc = ""]
85 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleDeclaration/item)"]
86 #[doc = ""]
87 #[doc = "*This API requires the following crate features to be activated: `CssStyleDeclaration`*"]
88 pub fn item(this: &CssStyleDeclaration, index: u32) -> ::alloc::string::String;
89 #[wasm_bindgen(
90 catch,
91 method,
92 js_class = "CSSStyleDeclaration",
93 js_name = "removeProperty"
94 )]
95 #[doc = "The `removeProperty()` method."]
96 #[doc = ""]
97 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleDeclaration/removeProperty)"]
98 #[doc = ""]
99 #[doc = "*This API requires the following crate features to be activated: `CssStyleDeclaration`*"]
100 pub fn remove_property(
101 this: &CssStyleDeclaration,
102 property: &str,
103 ) -> Result<::alloc::string::String, JsValue>;
104 #[wasm_bindgen(
105 catch,
106 method,
107 js_class = "CSSStyleDeclaration",
108 js_name = "setProperty"
109 )]
110 #[doc = "The `setProperty()` method."]
111 #[doc = ""]
112 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleDeclaration/setProperty)"]
113 #[doc = ""]
114 #[doc = "*This API requires the following crate features to be activated: `CssStyleDeclaration`*"]
115 pub fn set_property(
116 this: &CssStyleDeclaration,
117 property: &str,
118 value: &str,
119 ) -> Result<(), JsValue>;
120 #[wasm_bindgen(
121 catch,
122 method,
123 js_class = "CSSStyleDeclaration",
124 js_name = "setProperty"
125 )]
126 #[doc = "The `setProperty()` method."]
127 #[doc = ""]
128 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleDeclaration/setProperty)"]
129 #[doc = ""]
130 #[doc = "*This API requires the following crate features to be activated: `CssStyleDeclaration`*"]
131 pub fn set_property_with_priority(
132 this: &CssStyleDeclaration,
133 property: &str,
134 value: &str,
135 priority: &str,
136 ) -> Result<(), JsValue>;
137 #[wasm_bindgen(method, js_class = "CSSStyleDeclaration", indexing_getter)]
138 #[doc = "Indexing getter. As in the literal Javascript `this[key]`."]
139 #[doc = ""]
140 #[doc = ""]
141 #[doc = "*This API requires the following crate features to be activated: `CssStyleDeclaration`*"]
142 pub fn get(this: &CssStyleDeclaration, index: u32) -> Option<::alloc::string::String>;
143}