[fx] web API: use var instead of const -> prevent error when the script is reloaded