The only solution that I have found so far is to put my handlers in a timeout like this:
chrome.tabs.onActivated.addListener((activeInfo) => {
setTimeout(() => {
// The old listener handler moves here
}, 100);
});
But there must be a better way, right?
More Related Contents:
- How to wait until an element exists?
- Chrome extension – retrieving global variable from webpage
- Chrome extension code vs Content scripts vs Injected scripts
- How to use jQuery in chrome extension?
- Communicate between scripts in the background context (background script, browser action, page action, options page, etc.)
- Chrome extension: How to save a file on disk
- Injecting javascript variable before content script
- How to communicate between popup.js and background.js in chrome extension?
- Chrome Extension: Make it run every page load
- How can I get selected text in pdf in Javascript?
- saving and retrieving from chrome.storage.sync
- How to fetch URL of current Tab in my chrome extension using javascript
- String compression in JavaScript
- Why is chrome.browserAction.onClicked undefined?
- Can the window object be modified from a Chrome extension? [duplicate]
- How do I send an HTTP GET request from a Chrome extension?
- Is there a way to uniquely identify an iframe that the content script runs in for my Chrome extension?
- How to trigger an ‘isTrusted=true’ click event using JavaScript?
- Get JSON in a Chrome extension
- Is there any way of passing additional data via custom events?
- How do I use WebStorm for Chrome Extension Development?
- How do I send an HTTP request from a Chrome extension?
- Sending message to background script
- Accessing iframe from chrome extension
- How to develop Chrome extension for Gmail?
- monitoring history.pushstate from a chrome extension
- Retrieving which tabs are open in Chrome?
- How to to initialize keyboard event with given char/keycode in a Chrome extension?
- Avoid dynamically injecting the same script multiple times when using chrome.tabs.executeScript(…)
- Link to chrome:// url from a webpage