web_sys/features/
gen_MediaQueryListEvent.rs1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 # [wasm_bindgen (extends = Event , extends = :: js_sys :: Object , js_name = MediaQueryListEvent , typescript_type = "MediaQueryListEvent")]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `MediaQueryListEvent` class."]
10 #[doc = ""]
11 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaQueryListEvent)"]
12 #[doc = ""]
13 #[doc = "*This API requires the following crate features to be activated: `MediaQueryListEvent`*"]
14 pub type MediaQueryListEvent;
15 # [wasm_bindgen (structural , method , getter , js_class = "MediaQueryListEvent" , js_name = media)]
16 #[doc = "Getter for the `media` field of this object."]
17 #[doc = ""]
18 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaQueryListEvent/media)"]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `MediaQueryListEvent`*"]
21 pub fn media(this: &MediaQueryListEvent) -> ::alloc::string::String;
22 # [wasm_bindgen (structural , method , getter , js_class = "MediaQueryListEvent" , js_name = matches)]
23 #[doc = "Getter for the `matches` field of this object."]
24 #[doc = ""]
25 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaQueryListEvent/matches)"]
26 #[doc = ""]
27 #[doc = "*This API requires the following crate features to be activated: `MediaQueryListEvent`*"]
28 pub fn matches(this: &MediaQueryListEvent) -> bool;
29 #[wasm_bindgen(catch, constructor, js_class = "MediaQueryListEvent")]
30 #[doc = "The `new MediaQueryListEvent(..)` constructor, creating a new instance of `MediaQueryListEvent`."]
31 #[doc = ""]
32 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaQueryListEvent/MediaQueryListEvent)"]
33 #[doc = ""]
34 #[doc = "*This API requires the following crate features to be activated: `MediaQueryListEvent`*"]
35 pub fn new(type_: &str) -> Result<MediaQueryListEvent, JsValue>;
36 #[cfg(feature = "MediaQueryListEventInit")]
37 #[wasm_bindgen(catch, constructor, js_class = "MediaQueryListEvent")]
38 #[doc = "The `new MediaQueryListEvent(..)` constructor, creating a new instance of `MediaQueryListEvent`."]
39 #[doc = ""]
40 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaQueryListEvent/MediaQueryListEvent)"]
41 #[doc = ""]
42 #[doc = "*This API requires the following crate features to be activated: `MediaQueryListEvent`, `MediaQueryListEventInit`*"]
43 pub fn new_with_event_init_dict(
44 type_: &str,
45 event_init_dict: &MediaQueryListEventInit,
46 ) -> Result<MediaQueryListEvent, JsValue>;
47}