Content scripts always run in an isolated world js context for a frame, and in general when a tab navigates normally, eg by clicking on an anchor tag, the frame gets torn down and replaced by a new one. So there is no way to keep a content script's js context alive. The solution to this is to use chrome.storage (https://developer.chrome.com/extensions/storage) or messaging back to your event page, to keep track of any state that you need to persist beyond the navigation.
--
You received this message because you are subscribed to the Google Groups "Chromium-Extensions-Announce" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extensions+unsub...@chromium.org.
To post to this group, send email to chromium-extensions@chromium.org.
Visit this group at https://groups.google.com/a/chromium.org/group/chromium-extensions/.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/6d9aea22-c242-439d-a84d-023f2e1b7c25%40chromium.org.
For more options, visit https://groups.google.com/a/chromium.org/d/optout.