maxcountryman_web_sys/features/
gen_DedicatedWorkerGlobalScope.rs

1#![allow(unused_imports)]
2use super::*;
3use wasm_bindgen::prelude::*;
4#[wasm_bindgen]
5extern "C" {
6    # [wasm_bindgen (extends = WorkerGlobalScope , extends = EventTarget , extends = :: js_sys :: Object , js_name = DedicatedWorkerGlobalScope , typescript_type = "DedicatedWorkerGlobalScope")]
7    #[derive(Debug, Clone, PartialEq, Eq)]
8    #[doc = "The `DedicatedWorkerGlobalScope` class."]
9    #[doc = ""]
10    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope)"]
11    #[doc = ""]
12    #[doc = "*This API requires the following crate features to be activated: `DedicatedWorkerGlobalScope`*"]
13    pub type DedicatedWorkerGlobalScope;
14    # [wasm_bindgen (structural , method , getter , js_class = "DedicatedWorkerGlobalScope" , js_name = name)]
15    #[doc = "Getter for the `name` field of this object."]
16    #[doc = ""]
17    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/name)"]
18    #[doc = ""]
19    #[doc = "*This API requires the following crate features to be activated: `DedicatedWorkerGlobalScope`*"]
20    pub fn name(this: &DedicatedWorkerGlobalScope) -> String;
21    # [wasm_bindgen (structural , method , getter , js_class = "DedicatedWorkerGlobalScope" , js_name = onmessage)]
22    #[doc = "Getter for the `onmessage` field of this object."]
23    #[doc = ""]
24    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/onmessage)"]
25    #[doc = ""]
26    #[doc = "*This API requires the following crate features to be activated: `DedicatedWorkerGlobalScope`*"]
27    pub fn onmessage(this: &DedicatedWorkerGlobalScope) -> Option<::js_sys::Function>;
28    # [wasm_bindgen (structural , method , setter , js_class = "DedicatedWorkerGlobalScope" , js_name = onmessage)]
29    #[doc = "Setter for the `onmessage` field of this object."]
30    #[doc = ""]
31    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/onmessage)"]
32    #[doc = ""]
33    #[doc = "*This API requires the following crate features to be activated: `DedicatedWorkerGlobalScope`*"]
34    pub fn set_onmessage(this: &DedicatedWorkerGlobalScope, value: Option<&::js_sys::Function>);
35    # [wasm_bindgen (structural , method , getter , js_class = "DedicatedWorkerGlobalScope" , js_name = onmessageerror)]
36    #[doc = "Getter for the `onmessageerror` field of this object."]
37    #[doc = ""]
38    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/onmessageerror)"]
39    #[doc = ""]
40    #[doc = "*This API requires the following crate features to be activated: `DedicatedWorkerGlobalScope`*"]
41    pub fn onmessageerror(this: &DedicatedWorkerGlobalScope) -> Option<::js_sys::Function>;
42    # [wasm_bindgen (structural , method , setter , js_class = "DedicatedWorkerGlobalScope" , js_name = onmessageerror)]
43    #[doc = "Setter for the `onmessageerror` field of this object."]
44    #[doc = ""]
45    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/onmessageerror)"]
46    #[doc = ""]
47    #[doc = "*This API requires the following crate features to be activated: `DedicatedWorkerGlobalScope`*"]
48    pub fn set_onmessageerror(
49        this: &DedicatedWorkerGlobalScope,
50        value: Option<&::js_sys::Function>,
51    );
52    # [wasm_bindgen (method , structural , js_class = "DedicatedWorkerGlobalScope" , js_name = close)]
53    #[doc = "The `close()` method."]
54    #[doc = ""]
55    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/close)"]
56    #[doc = ""]
57    #[doc = "*This API requires the following crate features to be activated: `DedicatedWorkerGlobalScope`*"]
58    pub fn close(this: &DedicatedWorkerGlobalScope);
59    # [wasm_bindgen (catch , method , structural , js_class = "DedicatedWorkerGlobalScope" , js_name = postMessage)]
60    #[doc = "The `postMessage()` method."]
61    #[doc = ""]
62    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/postMessage)"]
63    #[doc = ""]
64    #[doc = "*This API requires the following crate features to be activated: `DedicatedWorkerGlobalScope`*"]
65    pub fn post_message(
66        this: &DedicatedWorkerGlobalScope,
67        message: &::wasm_bindgen::JsValue,
68    ) -> Result<(), JsValue>;
69    # [wasm_bindgen (catch , method , structural , js_class = "DedicatedWorkerGlobalScope" , js_name = postMessage)]
70    #[doc = "The `postMessage()` method."]
71    #[doc = ""]
72    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/postMessage)"]
73    #[doc = ""]
74    #[doc = "*This API requires the following crate features to be activated: `DedicatedWorkerGlobalScope`*"]
75    pub fn post_message_with_transfer(
76        this: &DedicatedWorkerGlobalScope,
77        message: &::wasm_bindgen::JsValue,
78        transfer: &::wasm_bindgen::JsValue,
79    ) -> Result<(), JsValue>;
80}