We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 137a76b + d004276 commit 7469129Copy full SHA for 7469129
doc/en/function/this.md
@@ -83,6 +83,15 @@ local variable inside of `method` that refers to `Foo`.
83
outer `this`. In combination with [closures](#function.closures), it can also
84
be used to pass `this` values around.
85
86
+As of ECMAScript 5 you can use the `bind` method combined with an anonymous function to achieve the same result.
87
+
88
+ Foo.method = function() {
89
+ var test = function() {
90
+ // this now refers to Foo
91
+ }.bind(this);
92
+ test();
93
+ }
94
95
### Assigning Methods
96
97
Another thing that does **not** work in JavaScript is function aliasing, which is
0 commit comments