Open oyiptong opened 8 years ago
Until we add functionality to WebChannels, In order for the chrome NewTabWebChannel bookkeeping to work, we need to send an event on pagehide.
pagehide
Here's an example:
document.addEventListener("pagehide", function(e) { let msg = new window.CustomEvent("WebChannelMessageToChrome", { detail: { id: "dev-newtab", message: JSON.stringify({type: "pagehide"}), } }); window.dispatchEvent(msg); });
Until we add functionality to WebChannels, In order for the chrome NewTabWebChannel bookkeeping to work, we need to send an event on
pagehide
.Here's an example: