Created
February 6, 2015 03:25
-
-
Save Gerhut/3b92ff4373143daba76b to your computer and use it in GitHub Desktop.
// source http://jsbin.com/niyisa
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>JS Bin</title> | |
| </head> | |
| <body> | |
| <script id="jsbin-javascript"> | |
| funcProto = Function.prototype | |
| funcCall = funcProto.call | |
| funcApply = funcProto.apply | |
| funcProto.call = function () { | |
| console.log(this.name + ' called') | |
| } | |
| funcProto.apply = function () { | |
| console.log(this.name + ' applied') | |
| } | |
| function fn() { console.log('fn executed') } | |
| fn() | |
| fn.call() | |
| fn.apply() | |
| </script> | |
| <script id="jsbin-source-javascript" type="text/javascript">funcProto = Function.prototype | |
| funcCall = funcProto.call | |
| funcApply = funcProto.apply | |
| funcProto.call = function () { | |
| console.log(this.name + ' called') | |
| } | |
| funcProto.apply = function () { | |
| console.log(this.name + ' applied') | |
| } | |
| function fn() { console.log('fn executed') } | |
| fn() | |
| fn.call() | |
| fn.apply()</script></body> | |
| </html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| funcProto = Function.prototype | |
| funcCall = funcProto.call | |
| funcApply = funcProto.apply | |
| funcProto.call = function () { | |
| console.log(this.name + ' called') | |
| } | |
| funcProto.apply = function () { | |
| console.log(this.name + ' applied') | |
| } | |
| function fn() { console.log('fn executed') } | |
| fn() | |
| fn.call() | |
| fn.apply() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment