es6.reflect.apply.js 640 B

12345678910111213141516
  1. // 26.1.1 Reflect.apply(target, thisArgument, argumentsList)
  2. var $export = require('./_export')
  3. , aFunction = require('./_a-function')
  4. , anObject = require('./_an-object')
  5. , rApply = (require('./_global').Reflect || {}).apply
  6. , fApply = Function.apply;
  7. // MS Edge argumentsList argument is optional
  8. $export($export.S + $export.F * !require('./_fails')(function(){
  9. rApply(function(){});
  10. }), 'Reflect', {
  11. apply: function apply(target, thisArgument, argumentsList){
  12. var T = aFunction(target)
  13. , L = anObject(argumentsList);
  14. return rApply ? rApply(T, thisArgument, L) : fApply.call(T, thisArgument, L);
  15. }
  16. });