Skip to main content

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