jeudi 19 septembre 2019

pagehide event on Google Chrome

I am desperately trying to make this work on Chrome (fine on Firefox)

window.addEventListener(
  "pagehide",
  function() {
    console.log("pagehide");
  },
  { capture: true }
);

now this triggers on page reload, but there is no way it works when pressing forward or back button leads to another website.

Any suggestions? Thank you immensely!

PS I have found a bunch of issues here bugs.chromium.org but I am not sure if and which of them may apply.




Aucun commentaire:

Enregistrer un commentaire