Skip to main content

web_sys/features/
gen_css.rs

1pub mod css {
2    #![allow(unused_imports)]
3    #![allow(clippy::all)]
4    use super::super::*;
5    use wasm_bindgen::prelude::*;
6    #[wasm_bindgen]
7    extern "C" {
8        #[wasm_bindgen(js_name = "CSS")]
9        pub type JsNamespaceCss;
10    }
11    #[wasm_bindgen]
12    extern "C" {
13        #[cfg(web_sys_unstable_apis)]
14        #[cfg(feature = "HighlightRegistry")]
15        #[wasm_bindgen(
16            static_method_of = "JsNamespaceCss",
17            js_class = "CSS",
18            getter,
19            js_name = "highlights"
20        )]
21        #[doc = "Getter for the `CSS.highlights` field."]
22        #[doc = ""]
23        #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CSS/highlights)"]
24        #[doc = ""]
25        #[doc = "*This API requires the following crate features to be activated: `HighlightRegistry`, `css`*"]
26        #[doc = ""]
27        #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
28        #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
29        pub fn highlights() -> HighlightRegistry;
30        #[wasm_bindgen(js_namespace = "CSS")]
31        #[doc = "The `CSS.escape()` function."]
32        #[doc = ""]
33        #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CSS/escape)"]
34        #[doc = ""]
35        #[doc = "*This API requires the following crate features to be activated: `css`*"]
36        pub fn escape(ident: &str) -> ::alloc::string::String;
37        #[wasm_bindgen(catch, js_namespace = "CSS", js_name = "supports")]
38        #[doc = "The `CSS.supports()` function."]
39        #[doc = ""]
40        #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CSS/supports)"]
41        #[doc = ""]
42        #[doc = "*This API requires the following crate features to be activated: `css`*"]
43        pub fn supports_with_value(property: &str, value: &str) -> Result<bool, JsValue>;
44        #[wasm_bindgen(catch, js_namespace = "CSS")]
45        #[doc = "The `CSS.supports()` function."]
46        #[doc = ""]
47        #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CSS/supports)"]
48        #[doc = ""]
49        #[doc = "*This API requires the following crate features to be activated: `css`*"]
50        pub fn supports(condition_text: &str) -> Result<bool, JsValue>;
51    }
52}