web.set-immediate.js 564 B

1234567891011121314
  1. 'use strict';
  2. var $ = require('../internals/export');
  3. var globalThis = require('../internals/global-this');
  4. var setTask = require('../internals/task').set;
  5. var schedulersFix = require('../internals/schedulers-fix');
  6. // https://github.com/oven-sh/bun/issues/1633
  7. var setImmediate = globalThis.setImmediate ? schedulersFix(setTask, false) : setTask;
  8. // `setImmediate` method
  9. // http://w3c.github.io/setImmediate/#si-setImmediate
  10. $({ global: true, bind: true, enumerable: true, forced: globalThis.setImmediate !== setImmediate }, {
  11. setImmediate: setImmediate
  12. });