web_sys/features/
gen_Scheduler.rs1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[cfg(web_sys_unstable_apis)]
6#[wasm_bindgen]
7extern "C" {
8 #[wasm_bindgen(
9 extends = "::js_sys::Object",
10 js_name = "Scheduler",
11 typescript_type = "Scheduler"
12 )]
13 #[derive(Debug, Clone, PartialEq, Eq)]
14 #[doc = "The `Scheduler` class."]
15 #[doc = ""]
16 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Scheduler)"]
17 #[doc = ""]
18 #[doc = "*This API requires the following crate features to be activated: `Scheduler`*"]
19 #[doc = ""]
20 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
21 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
22 pub type Scheduler;
23 #[cfg(web_sys_unstable_apis)]
24 #[wasm_bindgen(method, js_class = "Scheduler", js_name = "postTask")]
25 #[doc = "The `postTask()` method."]
26 #[doc = ""]
27 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Scheduler/postTask)"]
28 #[doc = ""]
29 #[doc = "*This API requires the following crate features to be activated: `Scheduler`*"]
30 #[doc = ""]
31 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
32 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
33 pub fn post_task(
34 this: &Scheduler,
35 callback: &::js_sys::Function<fn() -> ::wasm_bindgen::JsValue>,
36 ) -> ::js_sys::Promise;
37 #[cfg(web_sys_unstable_apis)]
38 #[cfg(feature = "SchedulerPostTaskOptions")]
39 #[wasm_bindgen(method, js_class = "Scheduler", js_name = "postTask")]
40 #[doc = "The `postTask()` method."]
41 #[doc = ""]
42 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Scheduler/postTask)"]
43 #[doc = ""]
44 #[doc = "*This API requires the following crate features to be activated: `Scheduler`, `SchedulerPostTaskOptions`*"]
45 #[doc = ""]
46 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
47 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
48 pub fn post_task_with_options(
49 this: &Scheduler,
50 callback: &::js_sys::Function<fn() -> ::wasm_bindgen::JsValue>,
51 options: &SchedulerPostTaskOptions,
52 ) -> ::js_sys::Promise;
53}