2016-10-10 03:43:44 +02:00
|
|
|
// ie9- setTimeout & setInterval additional parameters fix
|
2017-04-20 03:09:25 +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)
|
|
|
|
});
|