Created
April 7, 2010 01:38
-
-
Save unscriptable/358373 to your computer and use it in GitHub Desktop.
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
$.each(itemList, function (which) { | |
// if dev passed an array | |
if ($.isArray(itemList)) | |
// use the 2nd arg as item name (1st arg is array index) | |
which = arguments[1]; | |
// check if we've already initialized this item | |
var already = doneMap[which]; | |
if (!already) | |
var itemInit = ctrlr._getItemInit(which); | |
if (itemInit) | |
// execute initializer | |
try { | |
itemInit.call(ctrlr, root, doneMap); | |
} | |
catch (ex) { | |
debug('FAIL! It\'s f**kin missing, you twit:' + itemInit + ' I CRASHED! ', which, ex); | |
} | |
else if (!already) | |
debug('FAIL! I duzznt know what that is: ' + itemInit, which); | |
// mark this item as initialized | |
doneMap[which] = true; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here's a close facsimile of the javascript that jslint puked on. For a full discussion please visit http://unscriptable.com/index.php/2010/04/06/jslint-puked-on-my-javascript/