maxcountryman_web_sys/features/
gen_GpuUncapturedErrorEventInit.rs1#![allow(unused_imports)]
2use super::*;
3use wasm_bindgen::prelude::*;
4#[cfg(web_sys_unstable_apis)]
5#[wasm_bindgen]
6extern "C" {
7 # [wasm_bindgen (extends = :: js_sys :: Object , js_name = GPUUncapturedErrorEventInit)]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `GpuUncapturedErrorEventInit` dictionary."]
10 #[doc = ""]
11 #[doc = "*This API requires the following crate features to be activated: `GpuUncapturedErrorEventInit`*"]
12 #[doc = ""]
13 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
14 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
15 pub type GpuUncapturedErrorEventInit;
16}
17#[cfg(web_sys_unstable_apis)]
18impl GpuUncapturedErrorEventInit {
19 #[doc = "Construct a new `GpuUncapturedErrorEventInit`."]
20 #[doc = ""]
21 #[doc = "*This API requires the following crate features to be activated: `GpuUncapturedErrorEventInit`*"]
22 #[doc = ""]
23 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
24 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
25 pub fn new(error: &::js_sys::Object) -> Self {
26 #[allow(unused_mut)]
27 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
28 ret.error(error);
29 ret
30 }
31 #[cfg(web_sys_unstable_apis)]
32 #[doc = "Change the `bubbles` field of this object."]
33 #[doc = ""]
34 #[doc = "*This API requires the following crate features to be activated: `GpuUncapturedErrorEventInit`*"]
35 #[doc = ""]
36 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
37 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
38 pub fn bubbles(&mut self, val: bool) -> &mut Self {
39 use wasm_bindgen::JsValue;
40 let r = ::js_sys::Reflect::set(
41 self.as_ref(),
42 &JsValue::from("bubbles"),
43 &JsValue::from(val),
44 );
45 debug_assert!(
46 r.is_ok(),
47 "setting properties should never fail on our dictionary objects"
48 );
49 let _ = r;
50 self
51 }
52 #[cfg(web_sys_unstable_apis)]
53 #[doc = "Change the `cancelable` field of this object."]
54 #[doc = ""]
55 #[doc = "*This API requires the following crate features to be activated: `GpuUncapturedErrorEventInit`*"]
56 #[doc = ""]
57 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
58 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
59 pub fn cancelable(&mut self, val: bool) -> &mut Self {
60 use wasm_bindgen::JsValue;
61 let r = ::js_sys::Reflect::set(
62 self.as_ref(),
63 &JsValue::from("cancelable"),
64 &JsValue::from(val),
65 );
66 debug_assert!(
67 r.is_ok(),
68 "setting properties should never fail on our dictionary objects"
69 );
70 let _ = r;
71 self
72 }
73 #[cfg(web_sys_unstable_apis)]
74 #[doc = "Change the `composed` field of this object."]
75 #[doc = ""]
76 #[doc = "*This API requires the following crate features to be activated: `GpuUncapturedErrorEventInit`*"]
77 #[doc = ""]
78 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
79 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
80 pub fn composed(&mut self, val: bool) -> &mut Self {
81 use wasm_bindgen::JsValue;
82 let r = ::js_sys::Reflect::set(
83 self.as_ref(),
84 &JsValue::from("composed"),
85 &JsValue::from(val),
86 );
87 debug_assert!(
88 r.is_ok(),
89 "setting properties should never fail on our dictionary objects"
90 );
91 let _ = r;
92 self
93 }
94 #[cfg(web_sys_unstable_apis)]
95 #[doc = "Change the `error` field of this object."]
96 #[doc = ""]
97 #[doc = "*This API requires the following crate features to be activated: `GpuUncapturedErrorEventInit`*"]
98 #[doc = ""]
99 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
100 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
101 pub fn error(&mut self, val: &::js_sys::Object) -> &mut Self {
102 use wasm_bindgen::JsValue;
103 let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("error"), &JsValue::from(val));
104 debug_assert!(
105 r.is_ok(),
106 "setting properties should never fail on our dictionary objects"
107 );
108 let _ = r;
109 self
110 }
111}