mirror of
https://github.com/tlsnotary/wasm-bindgen.git
synced 2026-01-09 15:08:01 -05:00
Add bindings for queueMicrotask (#3981)
This commit is contained in:
@@ -30,6 +30,9 @@
|
||||
* Add bindings for `VisualViewport`.
|
||||
[#3931](https://github.com/rustwasm/wasm-bindgen/pull/3931)
|
||||
|
||||
* Add bindings for `queueMicrotask`.
|
||||
[#3981](https://github.com/rustwasm/wasm-bindgen/pull/3981)
|
||||
|
||||
### Changed
|
||||
|
||||
* Stabilize Web Share API.
|
||||
|
||||
@@ -3001,6 +3001,13 @@ extern "C" {
|
||||
input: &str,
|
||||
init: &RequestInit,
|
||||
) -> ::js_sys::Promise;
|
||||
# [wasm_bindgen (method , structural , js_class = "Window" , js_name = queueMicrotask)]
|
||||
#[doc = "The `queueMicrotask()` method."]
|
||||
#[doc = ""]
|
||||
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Window/queueMicrotask)"]
|
||||
#[doc = ""]
|
||||
#[doc = "*This API requires the following crate features to be activated: `Window`*"]
|
||||
pub fn queue_microtask(this: &Window, callback: &::js_sys::Function);
|
||||
# [wasm_bindgen (catch , method , structural , js_class = "Window" , js_name = setInterval)]
|
||||
#[doc = "The `setInterval()` method."]
|
||||
#[doc = ""]
|
||||
|
||||
@@ -820,6 +820,13 @@ extern "C" {
|
||||
input: &str,
|
||||
init: &RequestInit,
|
||||
) -> ::js_sys::Promise;
|
||||
# [wasm_bindgen (method , structural , js_class = "WorkerGlobalScope" , js_name = queueMicrotask)]
|
||||
#[doc = "The `queueMicrotask()` method."]
|
||||
#[doc = ""]
|
||||
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WorkerGlobalScope/queueMicrotask)"]
|
||||
#[doc = ""]
|
||||
#[doc = "*This API requires the following crate features to be activated: `WorkerGlobalScope`*"]
|
||||
pub fn queue_microtask(this: &WorkerGlobalScope, callback: &::js_sys::Function);
|
||||
# [wasm_bindgen (catch , method , structural , js_class = "WorkerGlobalScope" , js_name = setInterval)]
|
||||
#[doc = "The `setInterval()` method."]
|
||||
#[doc = ""]
|
||||
|
||||
@@ -68,3 +68,8 @@ partial interface mixin WindowOrWorkerGlobalScope {
|
||||
[Throws, Func="mozilla::dom::DOMPrefs::DOMCachesEnabled", SameObject]
|
||||
readonly attribute CacheStorage caches;
|
||||
};
|
||||
|
||||
// https://html.spec.whatwg.org/#microtask-queuing
|
||||
partial interface mixin WindowOrWorkerGlobalScope {
|
||||
undefined queueMicrotask(VoidFunction callback);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user