Skip to main content

web_sys/features/
gen_WorkerDebuggerGlobalScope.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 = "EventTarget",
9        extends = "::js_sys::Object",
10        js_name = "WorkerDebuggerGlobalScope",
11        typescript_type = "WorkerDebuggerGlobalScope"
12    )]
13    #[derive(Debug, Clone, PartialEq, Eq)]
14    #[doc = "The `WorkerDebuggerGlobalScope` class."]
15    #[doc = ""]
16    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WorkerDebuggerGlobalScope)"]
17    #[doc = ""]
18    #[doc = "*This API requires the following crate features to be activated: `WorkerDebuggerGlobalScope`*"]
19    pub type WorkerDebuggerGlobalScope;
20    #[wasm_bindgen(
21        catch,
22        method,
23        getter,
24        js_class = "WorkerDebuggerGlobalScope",
25        js_name = "global"
26    )]
27    #[doc = "Getter for the `global` field of this object."]
28    #[doc = ""]
29    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WorkerDebuggerGlobalScope/global)"]
30    #[doc = ""]
31    #[doc = "*This API requires the following crate features to be activated: `WorkerDebuggerGlobalScope`*"]
32    pub fn global(this: &WorkerDebuggerGlobalScope) -> Result<::js_sys::Object, JsValue>;
33    #[wasm_bindgen(
34        method,
35        getter,
36        js_class = "WorkerDebuggerGlobalScope",
37        js_name = "onmessage"
38    )]
39    #[doc = "Getter for the `onmessage` field of this object."]
40    #[doc = ""]
41    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WorkerDebuggerGlobalScope/onmessage)"]
42    #[doc = ""]
43    #[doc = "*This API requires the following crate features to be activated: `WorkerDebuggerGlobalScope`*"]
44    pub fn onmessage(this: &WorkerDebuggerGlobalScope) -> Option<::js_sys::Function>;
45    #[wasm_bindgen(
46        method,
47        setter,
48        js_class = "WorkerDebuggerGlobalScope",
49        js_name = "onmessage"
50    )]
51    #[doc = "Setter for the `onmessage` field of this object."]
52    #[doc = ""]
53    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WorkerDebuggerGlobalScope/onmessage)"]
54    #[doc = ""]
55    #[doc = "*This API requires the following crate features to be activated: `WorkerDebuggerGlobalScope`*"]
56    pub fn set_onmessage(this: &WorkerDebuggerGlobalScope, value: Option<&::js_sys::Function>);
57    #[wasm_bindgen(
58        catch,
59        method,
60        js_class = "WorkerDebuggerGlobalScope",
61        js_name = "createSandbox"
62    )]
63    #[doc = "The `createSandbox()` method."]
64    #[doc = ""]
65    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WorkerDebuggerGlobalScope/createSandbox)"]
66    #[doc = ""]
67    #[doc = "*This API requires the following crate features to be activated: `WorkerDebuggerGlobalScope`*"]
68    pub fn create_sandbox(
69        this: &WorkerDebuggerGlobalScope,
70        name: &str,
71        prototype: &::js_sys::Object,
72    ) -> Result<::js_sys::Object, JsValue>;
73    #[wasm_bindgen(method, js_class = "WorkerDebuggerGlobalScope")]
74    #[doc = "The `dump()` method."]
75    #[doc = ""]
76    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WorkerDebuggerGlobalScope/dump)"]
77    #[doc = ""]
78    #[doc = "*This API requires the following crate features to be activated: `WorkerDebuggerGlobalScope`*"]
79    pub fn dump(this: &WorkerDebuggerGlobalScope);
80    #[wasm_bindgen(method, js_class = "WorkerDebuggerGlobalScope", js_name = "dump")]
81    #[doc = "The `dump()` method."]
82    #[doc = ""]
83    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WorkerDebuggerGlobalScope/dump)"]
84    #[doc = ""]
85    #[doc = "*This API requires the following crate features to be activated: `WorkerDebuggerGlobalScope`*"]
86    pub fn dump_with_string(this: &WorkerDebuggerGlobalScope, string: &str);
87    #[wasm_bindgen(
88        method,
89        js_class = "WorkerDebuggerGlobalScope",
90        js_name = "enterEventLoop"
91    )]
92    #[doc = "The `enterEventLoop()` method."]
93    #[doc = ""]
94    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WorkerDebuggerGlobalScope/enterEventLoop)"]
95    #[doc = ""]
96    #[doc = "*This API requires the following crate features to be activated: `WorkerDebuggerGlobalScope`*"]
97    pub fn enter_event_loop(this: &WorkerDebuggerGlobalScope);
98    #[wasm_bindgen(
99        method,
100        js_class = "WorkerDebuggerGlobalScope",
101        js_name = "leaveEventLoop"
102    )]
103    #[doc = "The `leaveEventLoop()` method."]
104    #[doc = ""]
105    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WorkerDebuggerGlobalScope/leaveEventLoop)"]
106    #[doc = ""]
107    #[doc = "*This API requires the following crate features to be activated: `WorkerDebuggerGlobalScope`*"]
108    pub fn leave_event_loop(this: &WorkerDebuggerGlobalScope);
109    #[wasm_bindgen(
110        catch,
111        method,
112        js_class = "WorkerDebuggerGlobalScope",
113        js_name = "loadSubScript"
114    )]
115    #[doc = "The `loadSubScript()` method."]
116    #[doc = ""]
117    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WorkerDebuggerGlobalScope/loadSubScript)"]
118    #[doc = ""]
119    #[doc = "*This API requires the following crate features to be activated: `WorkerDebuggerGlobalScope`*"]
120    pub fn load_sub_script(this: &WorkerDebuggerGlobalScope, url: &str) -> Result<(), JsValue>;
121    #[wasm_bindgen(
122        catch,
123        method,
124        js_class = "WorkerDebuggerGlobalScope",
125        js_name = "loadSubScript"
126    )]
127    #[doc = "The `loadSubScript()` method."]
128    #[doc = ""]
129    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WorkerDebuggerGlobalScope/loadSubScript)"]
130    #[doc = ""]
131    #[doc = "*This API requires the following crate features to be activated: `WorkerDebuggerGlobalScope`*"]
132    pub fn load_sub_script_with_sandbox(
133        this: &WorkerDebuggerGlobalScope,
134        url: &str,
135        sandbox: &::js_sys::Object,
136    ) -> Result<(), JsValue>;
137    #[wasm_bindgen(
138        method,
139        js_class = "WorkerDebuggerGlobalScope",
140        js_name = "postMessage"
141    )]
142    #[doc = "The `postMessage()` method."]
143    #[doc = ""]
144    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WorkerDebuggerGlobalScope/postMessage)"]
145    #[doc = ""]
146    #[doc = "*This API requires the following crate features to be activated: `WorkerDebuggerGlobalScope`*"]
147    pub fn post_message(this: &WorkerDebuggerGlobalScope, message: &str);
148    #[wasm_bindgen(
149        method,
150        js_class = "WorkerDebuggerGlobalScope",
151        js_name = "reportError"
152    )]
153    #[doc = "The `reportError()` method."]
154    #[doc = ""]
155    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WorkerDebuggerGlobalScope/reportError)"]
156    #[doc = ""]
157    #[doc = "*This API requires the following crate features to be activated: `WorkerDebuggerGlobalScope`*"]
158    pub fn report_error(this: &WorkerDebuggerGlobalScope, message: &str);
159    #[wasm_bindgen(
160        catch,
161        method,
162        js_class = "WorkerDebuggerGlobalScope",
163        js_name = "retrieveConsoleEvents"
164    )]
165    #[doc = "The `retrieveConsoleEvents()` method."]
166    #[doc = ""]
167    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WorkerDebuggerGlobalScope/retrieveConsoleEvents)"]
168    #[doc = ""]
169    #[doc = "*This API requires the following crate features to be activated: `WorkerDebuggerGlobalScope`*"]
170    pub fn retrieve_console_events(
171        this: &WorkerDebuggerGlobalScope,
172    ) -> Result<::js_sys::Array, JsValue>;
173    #[wasm_bindgen(
174        catch,
175        method,
176        js_class = "WorkerDebuggerGlobalScope",
177        js_name = "setConsoleEventHandler"
178    )]
179    #[doc = "The `setConsoleEventHandler()` method."]
180    #[doc = ""]
181    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WorkerDebuggerGlobalScope/setConsoleEventHandler)"]
182    #[doc = ""]
183    #[doc = "*This API requires the following crate features to be activated: `WorkerDebuggerGlobalScope`*"]
184    pub fn set_console_event_handler(
185        this: &WorkerDebuggerGlobalScope,
186        handler: Option<&::js_sys::Function>,
187    ) -> Result<(), JsValue>;
188    #[wasm_bindgen(
189        catch,
190        method,
191        js_class = "WorkerDebuggerGlobalScope",
192        js_name = "setImmediate"
193    )]
194    #[doc = "The `setImmediate()` method."]
195    #[doc = ""]
196    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WorkerDebuggerGlobalScope/setImmediate)"]
197    #[doc = ""]
198    #[doc = "*This API requires the following crate features to be activated: `WorkerDebuggerGlobalScope`*"]
199    pub fn set_immediate(
200        this: &WorkerDebuggerGlobalScope,
201        handler: &::js_sys::Function,
202    ) -> Result<(), JsValue>;
203}