Skip to main content

web_sys/features/
gen_WebGlContextEvent.rs

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