Super easy one. Using something like Mootools or JQuery or just plain old JS. Can you select a node to work on before the window being ready
For instance (sry for my short hand)
<script>
my = $('main');
my.danceLevel = 1000000;
WindowReady(){
dance(my);
}
</script>
Since the window is not ready can you count on elements being substantiated? Is window ready it being ready to render or being parsed etc..?