I need to write a Chrome extension that gets notified everytime a download is initiated or about to begin. The extension also needs to be able to prevent the download from continuing.
I tried searching everywhere for ways to do this... but I wasn't getting anywhere.
How would I go about doing this? Is there some function I can call to register a callback?