Skip to content

Instantly share code, notes, and snippets.

@joeauty
Created July 15, 2011 20:37
Show Gist options
  • Select an option

  • Save joeauty/1085507 to your computer and use it in GitHub Desktop.

Select an option

Save joeauty/1085507 to your computer and use it in GitHub Desktop.
delay execution until custom event
if (typeof webkit.localjsloaded == "undefined") {
// local JS hasn't loaded yet, wait until it has
webkit.Y.Global.on('localjs:init', function() {
webkit.loadContent(page)
});
return;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment