I'm building a chrome extension and attempting to attach an event listener to this, but I'm not seeing anything in the console of the background page.
chrome.extension.onRequest.addListener(function(request, sender, sendResponse) {
console.log('REFERRER', request.ref);
});
This code is in my main.js background page, all my other event listeners (chrome.tabs.onUpdated, chrome.extension.onMessage, etc) are all working fine though.
Google is planning to remove inline installation from Chrome for existing extensions starting on September 12th, and Chrome users will be redirected to the Web Store. With Chrome 71 in early December, Google is also planning to remove the inline install API method entirely.
The chrome. extension API has utilities that can be used by any extension page. It includes support for exchanging messages between an extension and its content scripts or between extensions, as described in detail in Message Passing.
If you see a message saying "Extensions Disabled," it's because Chrome has turned off one or more of your extensions to keep your data safe while you're browsing the Internet. The extensions that Chrome turned off either didn't come from the Chrome Web Store or were determined unsafe.
Open the Extensions by clicking the puzzle icon next to your profile avatar. A dropdown menu will appear, showing you all of your enabled extensions. Each extension will have a pushpin icon to the right of it. To pin an extension to Chrome, click the pushpin icon so that the icon turns blue.
Yes, Request
was deprecated in favor of 'Message'. So instead of onRequest
you should use onMessage
, and sendMessage
as a replacement for sendRequest
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With