Emit the javascript environment once page is loaded