maxcountryman_web_sys/features/
gen_CloseEvent.rs

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