The quit function in Godot only works on desktop builds, on web builds it just crashes. You'd think it would automatically check what platform its running on, but you have to either remove/disable the button before exporting or make the check yourself.