Initialization happens just once when the HTML finishes loading. This function is invoked by the onload event on the <body> element.
onload
<body>
var canvas
var gl
These are all that tasks that should be performed exactly once.