wallet-core/node_modules/core-js/modules/web.timers.js

20 lines
702 B
JavaScript
Raw Normal View History

2016-10-10 03:43:44 +02:00
// ie9- setTimeout & setInterval additional parameters fix
2017-05-27 17:36:13 +02:00
var global = require('./_global')
, $export = require('./_export')
, invoke = require('./_invoke')
, partial = require('./_partial')
2016-10-10 03:43:44 +02:00
, navigator = global.navigator
, MSIE = !!navigator && /MSIE .\./.test(navigator.userAgent); // <- dirty ie9- check
var wrap = function(set){
return MSIE ? function(fn, time /*, ...args */){
return set(invoke(
partial,
[].slice.call(arguments, 2),
typeof fn == 'function' ? fn : Function(fn)
), time);
} : set;
};
$export($export.G + $export.B + $export.F * MSIE, {
setTimeout: wrap(global.setTimeout),
setInterval: wrap(global.setInterval)
});