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