web.immediate.js 524 B

123456789101112131415
  1. var $ = require('../internals/export');
  2. var global = require('../internals/global');
  3. var task = require('../internals/task');
  4. var FORCED = !global.setImmediate || !global.clearImmediate;
  5. // http://w3c.github.io/setImmediate/
  6. $({ global: true, bind: true, enumerable: true, forced: FORCED }, {
  7. // `setImmediate` method
  8. // http://w3c.github.io/setImmediate/#si-setImmediate
  9. setImmediate: task.set,
  10. // `clearImmediate` method
  11. // http://w3c.github.io/setImmediate/#si-clearImmediate
  12. clearImmediate: task.clear
  13. });