]> git.proxmox.com Git - rustc.git/blob - vendor/web-sys/src/features/gen_DedicatedWorkerGlobalScope.rs
New upstream version 1.72.1+dfsg1
[rustc.git] / vendor / web-sys / src / features / gen_DedicatedWorkerGlobalScope.rs
1 #![allow(unused_imports)]
2 #![allow(clippy::all)]
3 use super::*;
4 use wasm_bindgen::prelude::*;
5 #[wasm_bindgen]
6 extern "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) -> 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 # [wasm_bindgen (method , structural , js_class = "DedicatedWorkerGlobalScope" , js_name = close)]
54 #[doc = "The `close()` method."]
55 #[doc = ""]
56 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/close)"]
57 #[doc = ""]
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."]
62 #[doc = ""]
63 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/postMessage)"]
64 #[doc = ""]
65 #[doc = "*This API requires the following crate features to be activated: `DedicatedWorkerGlobalScope`*"]
66 pub fn post_message(
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."]
72 #[doc = ""]
73 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/postMessage)"]
74 #[doc = ""]
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."]
83 #[doc = ""]
84 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/cancelAnimationFrame)"]
85 #[doc = ""]
86 #[doc = "*This API requires the following crate features to be activated: `DedicatedWorkerGlobalScope`*"]
87 pub fn cancel_animation_frame(
88 this: &DedicatedWorkerGlobalScope,
89 handle: i32,
90 ) -> Result<(), JsValue>;
91 # [wasm_bindgen (catch , method , structural , js_class = "DedicatedWorkerGlobalScope" , js_name = requestAnimationFrame)]
92 #[doc = "The `requestAnimationFrame()` method."]
93 #[doc = ""]
94 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/requestAnimationFrame)"]
95 #[doc = ""]
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>;
101 }