Is there a way to remove the listener attached to the onRequest
event by
chrome.extension.onRequest.addListener
in Chrome after a request is made? I tried doing it like this:
chrome.extension.onRequest.addListener(
function(request){
chrome.extension.onRequest.removeListener();
other_function(request);
}
);
However, I am unsure if this method actually works. Attempting to use
chrome.extension.onRequest.hasListener
did not yield accurate results either. Are there any alternative approaches to removing the onRequest
listener or verifying its existence?
Thank you!