Skip to content

Commit

Permalink
polyfillCaller simplification
Browse files Browse the repository at this point in the history
  • Loading branch information
pdallmer committed Sep 8, 2024
1 parent c07868d commit f1c7ad8
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions documentation/dynamicPolyfills.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,18 @@ function DynamicPolyfillCaller() {
this.getFunction = function (callee, funcName) {
return this._functions[funcName][this.getType(callee)];
};
this._call = function (callee, funcName, args) {
var f = this.getFunction(callee, funcName);
return f.apply(callee, args);
};
return this;
}
var _dpf = new DynamicPolyfillCaller();
var _dpfc = new DynamicPolyfillCaller();
/******/(function () {
// webpackBootstrap
_dpf.getFunction([1, 2, 3], "map").call([1, 2, 3], function (e) {
_dpfc._call([1, 2, 3], "map", [function (e) {
return e * 2;
});
}]);
/******/
})();
```
Expand Down

0 comments on commit f1c7ad8

Please sign in to comment.