I hereby claim:
- I am sirbarrence on github.
- I am barrysimpson (https://keybase.io/barrysimpson) on keybase.
- I have a public key whose fingerprint is 1681 C5AF CCB4 4ADA 88C8 9CF7 4E77 556C 52CD 2279
To claim this, I am signing this object:
| var WhatIsThis = function () { | |
| var _this = this; // `_this` or `that` or `self`, take your pick | |
| // References to Window below assume you're running in a browser and not node.js | |
| console.log("'this' directly in constructor body: ", this); // 'this' is WhatIsThis | |
| function privateFunc() { | |
| console.log("'this' in privateFunc: ", this); // 'this' is Window | |
| console.log("'_this' in privateFunc: ", _this); // '_this' is WhatIsThis |
I hereby claim:
To claim this, I am signing this object:
| 'use strict'; | |
| function rxDecorateDirective($provide, directiveName) { | |
| // Duck-typing function lifted from the rx.js source. | |
| function isObservable(obj) { | |
| return obj && typeof obj.subscribe === 'function'; | |
| } | |
| $provide.decorator(directiveName + 'Directive', ['$delegate', 'rx', function($delegate, rx) { | |
| var directiveConfig = $delegate[0]; |
| diff --git a/rxDecorateDirective.js b/rxDecorateDirective.js | |
| index 56912ca..1ecb8b5 100644 | |
| --- a/rxDecorateDirective.js | |
| +++ b/rxDecorateDirective.js | |
| @@ -1,4 +1,7 @@ | |
| +'use strict'; | |
| + | |
| function rxDecorateDirective($provide, directiveName) { | |
| + // Duck-typing function lifted from the rx.js source. | |
| function isObservable(obj) { |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <script src="background.js"></script> | |
| </head> | |
| <body> | |
| <textarea id="ta"></textarea> | |
| </body> | |
| </html> |