web_sys/features/
gen_SharedWorkerGlobalScope.rs

1#![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 = SharedWorkerGlobalScope , typescript_type = "SharedWorkerGlobalScope")]
8    #[derive(Debug, Clone, PartialEq, Eq)]
9    #[doc = "The `SharedWorkerGlobalScope` class."]
10    #[doc = ""]
11    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SharedWorkerGlobalScope)"]
12    #[doc = ""]
13    #[doc = "*This API requires the following crate features to be activated: `SharedWorkerGlobalScope`*"]
14    pub type SharedWorkerGlobalScope;
15    # [wasm_bindgen (structural , method , getter , js_class = "SharedWorkerGlobalScope" , 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/SharedWorkerGlobalScope/name)"]
19    #[doc = ""]
20    #[doc = "*This API requires the following crate features to be activated: `SharedWorkerGlobalScope`*"]
21    pub fn name(this: &SharedWorkerGlobalScope) -> ::alloc::string::String;
22    # [wasm_bindgen (structural , method , getter , js_class = "SharedWorkerGlobalScope" , js_name = onconnect)]
23    #[doc = "Getter for the `onconnect` field of this object."]
24    #[doc = ""]
25    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SharedWorkerGlobalScope/onconnect)"]
26    #[doc = ""]
27    #[doc = "*This API requires the following crate features to be activated: `SharedWorkerGlobalScope`*"]
28    pub fn onconnect(this: &SharedWorkerGlobalScope) -> Option<::js_sys::Function>;
29    # [wasm_bindgen (structural , method , setter , js_class = "SharedWorkerGlobalScope" , js_name = onconnect)]
30    #[doc = "Setter for the `onconnect` field of this object."]
31    #[doc = ""]
32    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SharedWorkerGlobalScope/onconnect)"]
33    #[doc = ""]
34    #[doc = "*This API requires the following crate features to be activated: `SharedWorkerGlobalScope`*"]
35    pub fn set_onconnect(this: &SharedWorkerGlobalScope, value: Option<&::js_sys::Function>);
36    # [wasm_bindgen (method , structural , js_class = "SharedWorkerGlobalScope" , js_name = close)]
37    #[doc = "The `close()` method."]
38    #[doc = ""]
39    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SharedWorkerGlobalScope/close)"]
40    #[doc = ""]
41    #[doc = "*This API requires the following crate features to be activated: `SharedWorkerGlobalScope`*"]
42    pub fn close(this: &SharedWorkerGlobalScope);
43}