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