Created
December 27, 2013 21:13
-
-
Save pellebjerkestrand/8152672 to your computer and use it in GitHub Desktop.
Initialization meta module
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(global){ | |
| /* Initialization meta module. Pelle Bjerkestrand. WTFPL. */ | |
| 'use strict'; | |
| var app = global.app || {}; | |
| function init(){ | |
| for (var key in app) { | |
| if (app.hasOwnProperty(key)) { | |
| var module = app[key]; | |
| if(!!module.init && typeof module.init === "function"){ | |
| module.init(); | |
| } | |
| } | |
| } | |
| } | |
| app.init = init; | |
| global.document.addEventListener("DOMContentLoaded", function() { | |
| app.init(); | |
| }); | |
| global.app = app; | |
| })(this); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment