mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
queueMicrotask added
This commit is contained in:
parent
968b45f9dc
commit
b01b2d3d2e
11 changed files with 42 additions and 75 deletions
|
@ -5,6 +5,7 @@
|
|||
use crate::compartments::InCompartment;
|
||||
use crate::dom::bindings::cell::{DomRefCell, Ref};
|
||||
use crate::dom::bindings::codegen::Bindings::RequestBinding::RequestInit;
|
||||
use crate::dom::bindings::codegen::Bindings::VoidFunctionBinding::VoidFunction;
|
||||
use crate::dom::bindings::codegen::Bindings::WorkerBinding::WorkerType;
|
||||
use crate::dom::bindings::codegen::Bindings::WorkerGlobalScopeBinding::WorkerGlobalScopeMethods;
|
||||
use crate::dom::bindings::codegen::UnionTypes::{RequestOrUSVString, StringOrFunction};
|
||||
|
@ -341,6 +342,12 @@ impl WorkerGlobalScopeMethods for WorkerGlobalScope {
|
|||
self.ClearTimeout(handle);
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-queuemicrotask
|
||||
fn QueueMicrotask(&self, callback: Rc<VoidFunction>) {
|
||||
self.upcast::<GlobalScope>()
|
||||
.queue_function_as_microtask(callback);
|
||||
}
|
||||
|
||||
#[allow(unrooted_must_root)]
|
||||
// https://fetch.spec.whatwg.org/#fetch-method
|
||||
fn Fetch(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue