web_sys/features/
gen_DedicatedWorkerGlobalScope.rs1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 #[wasm_bindgen(
8 extends = "WorkerGlobalScope",
9 extends = "EventTarget",
10 extends = "::js_sys::Object",
11 js_name = "DedicatedWorkerGlobalScope",
12 typescript_type = "DedicatedWorkerGlobalScope"
13 )]
14 #[derive(Debug, Clone, PartialEq, Eq)]
15 #[doc = "The `DedicatedWorkerGlobalScope` class."]
16 #[doc = ""]
17 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope)"]
18 #[doc = ""]
19 #[doc = "*This API requires the following crate features to be activated: `DedicatedWorkerGlobalScope`*"]
20 pub type DedicatedWorkerGlobalScope;
21 #[wasm_bindgen(
22 method,
23 getter,
24 js_class = "DedicatedWorkerGlobalScope",
25 js_name = "name"
26 )]
27 #[doc = "Getter for the `name` field of this object."]
28 #[doc = ""]
29 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/name)"]
30 #[doc = ""]
31 #[doc = "*This API requires the following crate features to be activated: `DedicatedWorkerGlobalScope`*"]
32 pub fn name(this: &DedicatedWorkerGlobalScope) -> ::alloc::string::String;
33 #[wasm_bindgen(
34 method,
35 getter,
36 js_class = "DedicatedWorkerGlobalScope",
37 js_name = "onmessage"
38 )]
39 #[doc = "Getter for the `onmessage` field of this object."]
40 #[doc = ""]
41 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/onmessage)"]
42 #[doc = ""]
43 #[doc = "*This API requires the following crate features to be activated: `DedicatedWorkerGlobalScope`*"]
44 pub fn onmessage(this: &DedicatedWorkerGlobalScope) -> Option<::js_sys::Function>;
45 #[wasm_bindgen(
46 method,
47 setter,
48 js_class = "DedicatedWorkerGlobalScope",
49 js_name = "onmessage"
50 )]
51 #[doc = "Setter for the `onmessage` field of this object."]
52 #[doc = ""]
53 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/onmessage)"]
54 #[doc = ""]
55 #[doc = "*This API requires the following crate features to be activated: `DedicatedWorkerGlobalScope`*"]
56 pub fn set_onmessage(this: &DedicatedWorkerGlobalScope, value: Option<&::js_sys::Function>);
57 #[wasm_bindgen(
58 method,
59 getter,
60 js_class = "DedicatedWorkerGlobalScope",
61 js_name = "onmessageerror"
62 )]
63 #[doc = "Getter for the `onmessageerror` field of this object."]
64 #[doc = ""]
65 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/onmessageerror)"]
66 #[doc = ""]
67 #[doc = "*This API requires the following crate features to be activated: `DedicatedWorkerGlobalScope`*"]
68 pub fn onmessageerror(this: &DedicatedWorkerGlobalScope) -> Option<::js_sys::Function>;
69 #[wasm_bindgen(
70 method,
71 setter,
72 js_class = "DedicatedWorkerGlobalScope",
73 js_name = "onmessageerror"
74 )]
75 #[doc = "Setter for the `onmessageerror` field of this object."]
76 #[doc = ""]
77 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/onmessageerror)"]
78 #[doc = ""]
79 #[doc = "*This API requires the following crate features to be activated: `DedicatedWorkerGlobalScope`*"]
80 pub fn set_onmessageerror(
81 this: &DedicatedWorkerGlobalScope,
82 value: Option<&::js_sys::Function>,
83 );
84 #[cfg(web_sys_unstable_apis)]
85 #[wasm_bindgen(
86 method,
87 getter,
88 js_class = "DedicatedWorkerGlobalScope",
89 js_name = "onrtctransform"
90 )]
91 #[doc = "Getter for the `onrtctransform` field of this object."]
92 #[doc = ""]
93 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/onrtctransform)"]
94 #[doc = ""]
95 #[doc = "*This API requires the following crate features to be activated: `DedicatedWorkerGlobalScope`*"]
96 #[doc = ""]
97 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
98 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
99 pub fn onrtctransform(this: &DedicatedWorkerGlobalScope) -> Option<::js_sys::Function>;
100 #[cfg(web_sys_unstable_apis)]
101 #[wasm_bindgen(
102 method,
103 setter,
104 js_class = "DedicatedWorkerGlobalScope",
105 js_name = "onrtctransform"
106 )]
107 #[doc = "Setter for the `onrtctransform` field of this object."]
108 #[doc = ""]
109 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/onrtctransform)"]
110 #[doc = ""]
111 #[doc = "*This API requires the following crate features to be activated: `DedicatedWorkerGlobalScope`*"]
112 #[doc = ""]
113 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
114 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
115 pub fn set_onrtctransform(
116 this: &DedicatedWorkerGlobalScope,
117 value: Option<&::js_sys::Function>,
118 );
119 #[wasm_bindgen(method, js_class = "DedicatedWorkerGlobalScope")]
120 #[doc = "The `close()` method."]
121 #[doc = ""]
122 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/close)"]
123 #[doc = ""]
124 #[doc = "*This API requires the following crate features to be activated: `DedicatedWorkerGlobalScope`*"]
125 pub fn close(this: &DedicatedWorkerGlobalScope);
126 #[wasm_bindgen(
127 catch,
128 method,
129 js_class = "DedicatedWorkerGlobalScope",
130 js_name = "postMessage"
131 )]
132 #[doc = "The `postMessage()` method."]
133 #[doc = ""]
134 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/postMessage)"]
135 #[doc = ""]
136 #[doc = "*This API requires the following crate features to be activated: `DedicatedWorkerGlobalScope`*"]
137 pub fn post_message(
138 this: &DedicatedWorkerGlobalScope,
139 message: &::wasm_bindgen::JsValue,
140 ) -> Result<(), JsValue>;
141 #[wasm_bindgen(
142 catch,
143 method,
144 js_class = "DedicatedWorkerGlobalScope",
145 js_name = "postMessage"
146 )]
147 #[doc = "The `postMessage()` method."]
148 #[doc = ""]
149 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/postMessage)"]
150 #[doc = ""]
151 #[doc = "*This API requires the following crate features to be activated: `DedicatedWorkerGlobalScope`*"]
152 pub fn post_message_with_transfer(
153 this: &DedicatedWorkerGlobalScope,
154 message: &::wasm_bindgen::JsValue,
155 transfer: &::wasm_bindgen::JsValue,
156 ) -> Result<(), JsValue>;
157 #[wasm_bindgen(
158 catch,
159 method,
160 js_class = "DedicatedWorkerGlobalScope",
161 js_name = "cancelAnimationFrame"
162 )]
163 #[doc = "The `cancelAnimationFrame()` method."]
164 #[doc = ""]
165 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/cancelAnimationFrame)"]
166 #[doc = ""]
167 #[doc = "*This API requires the following crate features to be activated: `DedicatedWorkerGlobalScope`*"]
168 pub fn cancel_animation_frame(
169 this: &DedicatedWorkerGlobalScope,
170 handle: i32,
171 ) -> Result<(), JsValue>;
172 #[wasm_bindgen(
173 catch,
174 method,
175 js_class = "DedicatedWorkerGlobalScope",
176 js_name = "requestAnimationFrame"
177 )]
178 #[doc = "The `requestAnimationFrame()` method."]
179 #[doc = ""]
180 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/requestAnimationFrame)"]
181 #[doc = ""]
182 #[doc = "*This API requires the following crate features to be activated: `DedicatedWorkerGlobalScope`*"]
183 pub fn request_animation_frame(
184 this: &DedicatedWorkerGlobalScope,
185 callback: &::js_sys::Function,
186 ) -> Result<i32, JsValue>;
187}