Mechanic wise this game is really cool I didn't think the mouse sensitivity was too bad but locking it to the screen would have been nice, overall you created something that is really cool.
the mouse locking function is called when the game starts. maybe when starting the game within the web browser it's not on system focus (as if it was minimized) preventing the lock.