Created
February 6, 2015 14:05
-
-
Save akecn/eaf78702b865cf489798 to your computer and use it in GitHub Desktop.
run immediately of kissy module
This file contains 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
/** | |
* 突然想到这种方式,可以立即执行的kissy模块。 | |
*/ | |
KISSY.add("aaaa", function ake() { | |
console.log('immediately'); | |
return function() { | |
console.log('later'); | |
return ake; | |
} | |
}() | |
); | |
KISSY.use('aaaa', function(S, F) { | |
F(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment