Created
April 23, 2015 10:28
-
-
Save vkz/bd012cb5846ac710f6a3 to your computer and use it in GitHub Desktop.
apply with mode
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
| block b1, content: applyNext(this.bla = 'bla', 'default', this.ctx.b = 'b') |
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
| block('b1').content()(function () { | |
| return applyNext({ | |
| 'bla': 'bla', | |
| '_mode': 'default', | |
| 'ctx.b': 'b' | |
| }); | |
| }); |
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
| var cache; | |
| match(function () { | |
| return !this.elem; | |
| }, function () { | |
| return this.block === 'b1'; | |
| }, function () { | |
| return this['__$anflg2'] !== true; | |
| }, function () { | |
| return this._mode === 'content'; | |
| })(function () { | |
| return local({ '__$anflg2': true })(function () { | |
| return local({ | |
| 'bla': 'bla', | |
| '_mode': 'default', | |
| 'ctx.b': 'b' | |
| })(function () { | |
| return apply(); | |
| }); | |
| }); | |
| }); |
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
| {block: 'b1'} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment