es6.reflect.apply.js 655 B

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