I'm building a chrome extension, and I'm currently trying to capture all the fonts from a network request, and print their details to the console.
Here's what my background script looks like:
function processRequest(dict) {
console.log("inside test");
console.log(dict);
}
chrome.webRequest.onCompleted.addListener(processRequest, {
urls: ["https://developer.chrome.com/*"],
types: ["font"],
});
console.log("outside test");
When I look in the console, it prints outside test but not inside test. However, based on the google's documentation I would expect the code inside of my processRequest function to run.
Is there something that I'm missing here? My goal is to capture all the fonts from the network request and print those to the console. Any help would be appreciated — thanks!