Commit 3000e806 authored by Yay295's avatar Yay295

use window.queueMicrotask if available instead of custom func

parent d810e197
......@@ -276,7 +276,7 @@ let SubtitleManager = (function() {
// Fulfilled promises create microtasks.
let promise = Promise.resolve(true);
let addMicrotask = func => promise = promise.then(func);
let addMicrotask = window.queueMicrotask || (func => promise = promise.then(func));
// We can just use requestAnimationFrame to create an animation task.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment