Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Function.prototype.clone = function() {
- var that = this;
- var temp = function temporary() { return that.apply(this, arguments); };
- for(var key in this) {
- if (this.hasOwnProperty(key)) {
- temp[key] = this[key];
- }
- }
- return temp;
- };
- ƒ () {
- var that = this;
- var temp = function temporary() { return that.apply(this, arguments); };
- for(var key in this) {
- if (this.hasOwnProperty(key)) {
- temp[key] = this[…
- Function.call
- ƒ call() { [native code] }
- Function.prototype.LegacyCall = Function.prototype.call.clone();
- ƒ temporary() { return that.apply(this, arguments); }
- Function.prototype.call = function(){
- var fn = this;
- return function(){
- try {
- return fn.apply(this, arguments);
- } catch (ex) {
- console.error("1");
- }
- }
- }
- ƒ (){
- var fn = this;
- return function(){
- try {
- return fn.apply(this, arguments);
- } catch (ex) {
- console.error("1");
- }
- }
- }
- function test(){
- throw 123;
- }
- undefined
- test();
- VM622:2 Uncaught 123
- test @ VM622:2
- (anonymous) @ VM640:1
- test.call();
- ƒ (){
- try {
- return fn.apply(this, arguments);
- } catch (ex) {
- console.error("1");
- }
- }
- test.call()();
- VM532:8 1
- (anonymous) @ VM532:8
- (anonymous) @ VM679:1
- undefined
- test()();
- VM622:2 Uncaught 123
- test @ VM622:2
- (anonymous) @ VM703:1
- test.call
- ƒ (){
- var fn = this;
- return function(){
- try {
- return fn.apply(this, arguments);
- } catch (ex) {
- console.error("1");
- }
- }
- }
- Function.prototype.call = (function(){
- var fn = this;
- return function(){
- try {
- return fn.apply(this, arguments);
- } catch (ex) {
- console.error("1");
- }
- }
- })();
- ƒ (){
- try {
- return fn.apply(this, arguments);
- } catch (ex) {
- console.error("1");
- }
- }
- test();
- VM622:2 Uncaught 123
- test @ VM622:2
- (anonymous) @ VM796:1
- test.call();
- VM773:8 1
Advertisement
Add Comment
Please, Sign In to add comment