Created
September 18, 2011 13:28
-
-
Save tistaharahap/1225071 to your computer and use it in GitHub Desktop.
Blackberry Webworks - Execute JavaScript after UI rendering is Complete
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
var ready = self.setInterval("checkReady()", 100); | |
function checkReady() { | |
var root = document.getElementById("root"); // Change this to any HTML element | |
if(typeof root != 'undefined') { | |
window.clearInterval(ready); | |
__init(); | |
} | |
} | |
function __init() { | |
// Your codes here.. | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment