1
0
mirror of https://github.com/musix-org/musix-oss synced 2024-11-10 11:20:19 +00:00
musix-oss/node_modules/core-js/modules/web.queue-microtask.js
2020-03-03 22:30:50 +02:00

17 lines
584 B
JavaScript

var $ = require('../internals/export');
var global = require('../internals/global');
var microtask = require('../internals/microtask');
var classof = require('../internals/classof-raw');
var process = global.process;
var isNode = classof(process) == 'process';
// `queueMicrotask` method
// https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#dom-queuemicrotask
$({ global: true, enumerable: true, noTargetGet: true }, {
queueMicrotask: function queueMicrotask(fn) {
var domain = isNode && process.domain;
microtask(domain ? domain.bind(fn) : fn);
}
});