Thank you for the tips. I really didn't know unity doesn't support Application.quit in the Webgl version.