web.set-timeout.js 477 B

123456789101112
  1. 'use strict';
  2. var $ = require('../internals/export');
  3. var globalThis = require('../internals/global-this');
  4. var schedulersFix = require('../internals/schedulers-fix');
  5. var setTimeout = schedulersFix(globalThis.setTimeout, true);
  6. // Bun / IE9- setTimeout additional parameters fix
  7. // https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#dom-settimeout
  8. $({ global: true, bind: true, forced: globalThis.setTimeout !== setTimeout }, {
  9. setTimeout: setTimeout
  10. });