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 (extends = WorkerGlobalScope , extends = EventTarget , extends = :: js_sys :: Object , js_name = DedicatedWorkerGlobalScope , typescript_type = "DedicatedWorkerGlobalScope")]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `DedicatedWorkerGlobalScope` class."]
10 #[doc = ""]
11 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope)"]
12 #[doc = ""]
13 #[doc = "*This API requires the following crate features to be activated: `DedicatedWorkerGlobalScope`*"]
14 pub type DedicatedWorkerGlobalScope;
15 # [wasm_bindgen (structural , method , getter , js_class = "DedicatedWorkerGlobalScope" , js_name = name)]
16 #[doc = "Getter for the `name` field of this object."]
17 #[doc = ""]
18 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/name)"]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `DedicatedWorkerGlobalScope`*"]
21 pub fn name(this: &DedicatedWorkerGlobalScope) -> ::alloc::string::String;
22 # [wasm_bindgen (structural , method , getter , js_class = "DedicatedWorkerGlobalScope" , js_name = onmessage)]
23 #[doc = "Getter for the `onmessage` field of this object."]
24 #[doc = ""]
25 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/onmessage)"]
26 #[doc = ""]
27 #[doc = "*This API requires the following crate features to be activated: `DedicatedWorkerGlobalScope`*"]
28 pub fn onmessage(this: &DedicatedWorkerGlobalScope) -> Option<::js_sys::Function>;
29 # [wasm_bindgen (structural , method , setter , js_class = "DedicatedWorkerGlobalScope" , js_name = onmessage)]
30 #[doc = "Setter for the `onmessage` field of this object."]
31 #[doc = ""]
32 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/onmessage)"]
33 #[doc = ""]
34 #[doc = "*This API requires the following crate features to be activated: `DedicatedWorkerGlobalScope`*"]
35 pub fn set_onmessage(this: &DedicatedWorkerGlobalScope, value: Option<&::js_sys::Function>);
36 # [wasm_bindgen (structural , method , getter , js_class = "DedicatedWorkerGlobalScope" , js_name = onmessageerror)]
37 #[doc = "Getter for the `onmessageerror` field of this object."]
38 #[doc = ""]
39 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/onmessageerror)"]
40 #[doc = ""]
41 #[doc = "*This API requires the following crate features to be activated: `DedicatedWorkerGlobalScope`*"]
42 pub fn onmessageerror(this: &DedicatedWorkerGlobalScope) -> Option<::js_sys::Function>;
43 # [wasm_bindgen (structural , method , setter , js_class = "DedicatedWorkerGlobalScope" , js_name = onmessageerror)]
44 #[doc = "Setter for the `onmessageerror` field of this object."]
45 #[doc = ""]
46 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/onmessageerror)"]
47 #[doc = ""]
48 #[doc = "*This API requires the following crate features to be activated: `DedicatedWorkerGlobalScope`*"]
49 pub fn set_onmessageerror(
50 this: &DedicatedWorkerGlobalScope,
51 value: Option<&::js_sys::Function>,
52 );
53 #[cfg(web_sys_unstable_apis)]
54 # [wasm_bindgen (structural , method , getter , js_class = "DedicatedWorkerGlobalScope" , js_name = onrtctransform)]
55 #[doc = "Getter for the `onrtctransform` field of this object."]
56 #[doc = ""]
57 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/onrtctransform)"]
58 #[doc = ""]
59 #[doc = "*This API requires the following crate features to be activated: `DedicatedWorkerGlobalScope`*"]
60 #[doc = ""]
61 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
62 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
63 pub fn onrtctransform(this: &DedicatedWorkerGlobalScope) -> Option<::js_sys::Function>;
64 #[cfg(web_sys_unstable_apis)]
65 # [wasm_bindgen (structural , method , setter , js_class = "DedicatedWorkerGlobalScope" , js_name = onrtctransform)]
66 #[doc = "Setter for the `onrtctransform` field of this object."]
67 #[doc = ""]
68 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/onrtctransform)"]
69 #[doc = ""]
70 #[doc = "*This API requires the following crate features to be activated: `DedicatedWorkerGlobalScope`*"]
71 #[doc = ""]
72 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
73 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
74 pub fn set_onrtctransform(
75 this: &DedicatedWorkerGlobalScope,
76 value: Option<&::js_sys::Function>,
77 );
78 # [wasm_bindgen (method , structural , js_class = "DedicatedWorkerGlobalScope" , js_name = close)]
79 #[doc = "The `close()` method."]
80 #[doc = ""]
81 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/close)"]
82 #[doc = ""]
83 #[doc = "*This API requires the following crate features to be activated: `DedicatedWorkerGlobalScope`*"]
84 pub fn close(this: &DedicatedWorkerGlobalScope);
85 # [wasm_bindgen (catch , method , structural , js_class = "DedicatedWorkerGlobalScope" , js_name = postMessage)]
86 #[doc = "The `postMessage()` method."]
87 #[doc = ""]
88 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/postMessage)"]
89 #[doc = ""]
90 #[doc = "*This API requires the following crate features to be activated: `DedicatedWorkerGlobalScope`*"]
91 pub fn post_message(
92 this: &DedicatedWorkerGlobalScope,
93 message: &::wasm_bindgen::JsValue,
94 ) -> Result<(), JsValue>;
95 # [wasm_bindgen (catch , method , structural , js_class = "DedicatedWorkerGlobalScope" , js_name = postMessage)]
96 #[doc = "The `postMessage()` method."]
97 #[doc = ""]
98 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/postMessage)"]
99 #[doc = ""]
100 #[doc = "*This API requires the following crate features to be activated: `DedicatedWorkerGlobalScope`*"]
101 pub fn post_message_with_transfer(
102 this: &DedicatedWorkerGlobalScope,
103 message: &::wasm_bindgen::JsValue,
104 transfer: &::wasm_bindgen::JsValue,
105 ) -> Result<(), JsValue>;
106 # [wasm_bindgen (catch , method , structural , js_class = "DedicatedWorkerGlobalScope" , js_name = cancelAnimationFrame)]
107 #[doc = "The `cancelAnimationFrame()` method."]
108 #[doc = ""]
109 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/cancelAnimationFrame)"]
110 #[doc = ""]
111 #[doc = "*This API requires the following crate features to be activated: `DedicatedWorkerGlobalScope`*"]
112 pub fn cancel_animation_frame(
113 this: &DedicatedWorkerGlobalScope,
114 handle: i32,
115 ) -> Result<(), JsValue>;
116 # [wasm_bindgen (catch , method , structural , js_class = "DedicatedWorkerGlobalScope" , js_name = requestAnimationFrame)]
117 #[doc = "The `requestAnimationFrame()` method."]
118 #[doc = ""]
119 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/requestAnimationFrame)"]
120 #[doc = ""]
121 #[doc = "*This API requires the following crate features to be activated: `DedicatedWorkerGlobalScope`*"]
122 pub fn request_animation_frame(
123 this: &DedicatedWorkerGlobalScope,
124 callback: &::js_sys::Function,
125 ) -> Result<i32, JsValue>;
126}