maxcountryman_web_sys/features/
gen_MediaQueryList.rs1#![allow(unused_imports)]
2use super::*;
3use wasm_bindgen::prelude::*;
4#[wasm_bindgen]
5extern "C" {
6 # [wasm_bindgen (extends = EventTarget , extends = :: js_sys :: Object , js_name = MediaQueryList , typescript_type = "MediaQueryList")]
7 #[derive(Debug, Clone, PartialEq, Eq)]
8 #[doc = "The `MediaQueryList` class."]
9 #[doc = ""]
10 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaQueryList)"]
11 #[doc = ""]
12 #[doc = "*This API requires the following crate features to be activated: `MediaQueryList`*"]
13 pub type MediaQueryList;
14 # [wasm_bindgen (structural , method , getter , js_class = "MediaQueryList" , js_name = media)]
15 #[doc = "Getter for the `media` field of this object."]
16 #[doc = ""]
17 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaQueryList/media)"]
18 #[doc = ""]
19 #[doc = "*This API requires the following crate features to be activated: `MediaQueryList`*"]
20 pub fn media(this: &MediaQueryList) -> String;
21 # [wasm_bindgen (structural , method , getter , js_class = "MediaQueryList" , js_name = matches)]
22 #[doc = "Getter for the `matches` field of this object."]
23 #[doc = ""]
24 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaQueryList/matches)"]
25 #[doc = ""]
26 #[doc = "*This API requires the following crate features to be activated: `MediaQueryList`*"]
27 pub fn matches(this: &MediaQueryList) -> bool;
28 # [wasm_bindgen (structural , method , getter , js_class = "MediaQueryList" , js_name = onchange)]
29 #[doc = "Getter for the `onchange` field of this object."]
30 #[doc = ""]
31 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaQueryList/onchange)"]
32 #[doc = ""]
33 #[doc = "*This API requires the following crate features to be activated: `MediaQueryList`*"]
34 pub fn onchange(this: &MediaQueryList) -> Option<::js_sys::Function>;
35 # [wasm_bindgen (structural , method , setter , js_class = "MediaQueryList" , js_name = onchange)]
36 #[doc = "Setter for the `onchange` field of this object."]
37 #[doc = ""]
38 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaQueryList/onchange)"]
39 #[doc = ""]
40 #[doc = "*This API requires the following crate features to be activated: `MediaQueryList`*"]
41 pub fn set_onchange(this: &MediaQueryList, value: Option<&::js_sys::Function>);
42 # [wasm_bindgen (catch , method , structural , js_class = "MediaQueryList" , js_name = addListener)]
43 #[doc = "The `addListener()` method."]
44 #[doc = ""]
45 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaQueryList/addListener)"]
46 #[doc = ""]
47 #[doc = "*This API requires the following crate features to be activated: `MediaQueryList`*"]
48 pub fn add_listener_with_opt_callback(
49 this: &MediaQueryList,
50 listener: Option<&::js_sys::Function>,
51 ) -> Result<(), JsValue>;
52 #[cfg(feature = "EventListener")]
53 # [wasm_bindgen (catch , method , structural , js_class = "MediaQueryList" , js_name = addListener)]
54 #[doc = "The `addListener()` method."]
55 #[doc = ""]
56 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaQueryList/addListener)"]
57 #[doc = ""]
58 #[doc = "*This API requires the following crate features to be activated: `EventListener`, `MediaQueryList`*"]
59 pub fn add_listener_with_opt_event_listener(
60 this: &MediaQueryList,
61 listener: Option<&EventListener>,
62 ) -> Result<(), JsValue>;
63 # [wasm_bindgen (catch , method , structural , js_class = "MediaQueryList" , js_name = removeListener)]
64 #[doc = "The `removeListener()` method."]
65 #[doc = ""]
66 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaQueryList/removeListener)"]
67 #[doc = ""]
68 #[doc = "*This API requires the following crate features to be activated: `MediaQueryList`*"]
69 pub fn remove_listener_with_opt_callback(
70 this: &MediaQueryList,
71 listener: Option<&::js_sys::Function>,
72 ) -> Result<(), JsValue>;
73 #[cfg(feature = "EventListener")]
74 # [wasm_bindgen (catch , method , structural , js_class = "MediaQueryList" , js_name = removeListener)]
75 #[doc = "The `removeListener()` method."]
76 #[doc = ""]
77 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaQueryList/removeListener)"]
78 #[doc = ""]
79 #[doc = "*This API requires the following crate features to be activated: `EventListener`, `MediaQueryList`*"]
80 pub fn remove_listener_with_opt_event_listener(
81 this: &MediaQueryList,
82 listener: Option<&EventListener>,
83 ) -> Result<(), JsValue>;
84}