Is there a way of passing information to my game from javascript?
Yes. You can poll or get for information using htm5.run() or use extension by @AGulev