Last active
April 26, 2017 15:43
-
-
Save yeebus/a9b916fb4d5083f40ca7bddd5540698b 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
;(function($){ | |
// NOTE: Event queue | |
__e = window.__e || []; | |
var feature = { | |
init:function(){ | |
// Code here | |
} | |
}; | |
/* NOTE: Until all code is converted to use the event queue, this risks running in a different sequence than it currently does | |
__e.push(['dom-complete', function() { | |
if( wp_pb.StaticMethods.isPageHydrated() ){ | |
feature.init(); | |
} | |
}]); | |
*/ | |
if( wp_pb.StaticMethods.isPageHydrated() ){ | |
feature.init(); | |
} | |
// NOTE: For PWA | |
__e.push(['shamble', function() { | |
feature.init(); | |
}]); | |
})(jQuery); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment