I prepare a project with a simple webpage, canvas, and javascript files that run game in the canvas. I want load my code when page starts, what is best way?
- put body onload?
- startup code in body of .js file (not in function)?
- attach to window load event?
- use some jquery capability?
Thanks!