I am trying to use window.confirm
because you can set a custom message whereas with window.onbeforeunload
, you cannot.
Something like window.onbeforeunload = () => window.confirm('Are you sure you want to leave')
would be nice, but it doesn't work.
Aucun commentaire:
Enregistrer un commentaire