I'm building an application using KineticJS and with its latest update one of my text elements broke. The script that refers to it is in a onLoad handler and it's returning null. This is especially bizarre because when I run:
<div id="chatarea">
<textarea id="chatBox"></textarea>
<input type="text" id="chatInput">
</div>
<script>
console.debug(document.getElementById('chatarea'));
</script>
It doesn't return null. But when I call that same debug function in my script.js on the load handler it returns null, and in the console this happens AFTER the one above! So it can't be that the script is running before the chatarea exists. I've read the KineticJS changelog and documentation and I haven't found anything to help me. If anyone could shed some light on this I would greatly appreciate it. I can't use an earlier version because Google Chrome's May 30 update broke some functionality in it.
<head>
<script src="scripts/kinetic.js"></script>
<script src="scripts/screen.game.js"></script>
</head>