Last active
May 7, 2017 17:25
-
-
Save yeebus/c2d7fa77fb4f499dc4695c5e64c2a95a 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 || []; | |
function applyFeature(){ | |
// My messy code as it exists right now! | |
} | |
/* 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', applyFeature]); | |
*/ | |
if( wp_pb.StaticMethods.isPageHydrated() ){ | |
applyFeature() | |
} | |
// NOTE: For PWA | |
__e.push(['shamble', function(){ | |
applyFeature(); | |
}]); | |
})(jQuery); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment