keysocket icon indicating copy to clipboard operation
keysocket copied to clipboard

Replace deprecated unload handler with pagehide/pageshow in media-control-api.js

Open ignat980 opened this issue 4 months ago • 0 comments

  • Chrome has deprecated the unload event; DevTools shows “Unload event listeners are deprecated and will be removed.”
  • Replaced window.onunload with a pagehide listener to send unregisterTab.
  • Added a pageshow listener to re-register when restoring from the back/forward cache (event.persisted === true).
  • This removes the deprecation warning and should keep registration correct across navigations and bfcache restores.

ignat980 avatar Aug 23 '25 13:08 ignat980