1 #![allow(unused_imports)]
4 use wasm_bindgen
::prelude
::*;
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."]
11 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope)"]
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."]
18 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/name)"]
20 #[doc = "*This API requires the following crate features to be activated: `DedicatedWorkerGlobalScope`*"]
21 pub fn name(this
: &DedicatedWorkerGlobalScope
) -> String
;
22 # [wasm_bindgen (structural , method , getter , js_class = "DedicatedWorkerGlobalScope" , js_name = onmessage)]
23 #[doc = "Getter for the `onmessage` field of this object."]
25 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/onmessage)"]
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."]
32 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/onmessage)"]
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."]
39 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/onmessageerror)"]
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."]
46 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/onmessageerror)"]
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
>,
53 # [wasm_bindgen (method , structural , js_class = "DedicatedWorkerGlobalScope" , js_name = close)]
54 #[doc = "The `close()` method."]
56 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/close)"]
58 #[doc = "*This API requires the following crate features to be activated: `DedicatedWorkerGlobalScope`*"]
59 pub fn close(this
: &DedicatedWorkerGlobalScope
);
60 # [wasm_bindgen (catch , method , structural , js_class = "DedicatedWorkerGlobalScope" , js_name = postMessage)]
61 #[doc = "The `postMessage()` method."]
63 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/postMessage)"]
65 #[doc = "*This API requires the following crate features to be activated: `DedicatedWorkerGlobalScope`*"]
67 this
: &DedicatedWorkerGlobalScope
,
68 message
: &::wasm_bindgen
::JsValue
,
69 ) -> Result
<(), JsValue
>;
70 # [wasm_bindgen (catch , method , structural , js_class = "DedicatedWorkerGlobalScope" , js_name = postMessage)]
71 #[doc = "The `postMessage()` method."]
73 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/postMessage)"]
75 #[doc = "*This API requires the following crate features to be activated: `DedicatedWorkerGlobalScope`*"]
76 pub fn post_message_with_transfer(
77 this
: &DedicatedWorkerGlobalScope
,
78 message
: &::wasm_bindgen
::JsValue
,
79 transfer
: &::wasm_bindgen
::JsValue
,
80 ) -> Result
<(), JsValue
>;
81 # [wasm_bindgen (catch , method , structural , js_class = "DedicatedWorkerGlobalScope" , js_name = cancelAnimationFrame)]
82 #[doc = "The `cancelAnimationFrame()` method."]
84 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/cancelAnimationFrame)"]
86 #[doc = "*This API requires the following crate features to be activated: `DedicatedWorkerGlobalScope`*"]
87 pub fn cancel_animation_frame(
88 this
: &DedicatedWorkerGlobalScope
,
90 ) -> Result
<(), JsValue
>;
91 # [wasm_bindgen (catch , method , structural , js_class = "DedicatedWorkerGlobalScope" , js_name = requestAnimationFrame)]
92 #[doc = "The `requestAnimationFrame()` method."]
94 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/requestAnimationFrame)"]
96 #[doc = "*This API requires the following crate features to be activated: `DedicatedWorkerGlobalScope`*"]
97 pub fn request_animation_frame(
98 this
: &DedicatedWorkerGlobalScope
,
99 callback
: &::js_sys
::Function
,
100 ) -> Result
<i32, JsValue
>;