Created
April 2, 2013 09:48
-
-
Save sivagao/5291125 to your computer and use it in GitHub Desktop.
minimal sequent conditional scripts loader
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
| function(b) { | |
| // extra functions, test, variables here | |
| // it's a closure ! | |
| function c() { // k=[]会被滤掉, onload后再次仔细c(), e.shift(); | |
| if (d = e.shift()) a = b.body.appendChild(b.createElement("SCRIPT")), a.onload = c, a.src = d | |
| } | |
| var K = [], | |
| e = K.concat( | |
| Object.create ? K : 'es5-sham.js', | |
| K.forEach ? K : 'es5-shim.js', | |
| Function.bind ? K : 'bindOnlyShim.js', | |
| window.JSON ? K : 'json2.js', [ // library list | |
| 'lib.js', | |
| 'main.js'] | |
| ), | |
| a, d; | |
| c() | |
| }(document); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment