web.set-immediate.js 533 B

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