Need Support for AJAX XHR Requests

Ideally we need a extension functionality comparable to Chrome, and Firefox Event Listeners for webRequest.onBeforeRequest ->

  • CHROME chrome.webRequest.onBeforeRequest.addListener
  • FIREFOX browser.webRequest.onBeforeRequest.addListener

Description:
Chrome and Firefox expose these webRequest APIs, which we can implement in our plugins/add-ins for each respective Browser. Safari and Edge seem to be the outliers in our implementation and we would really like the ability to prevent data loss on both Windows and Mac to their maximum potentials.


Configuration:
macOS 10.14.x, iMac Retina 5K 27-inch, Late 2015, 3.3 GHz Intel Core i5, 16 GB DDR3 RAM, Graphics AMD Radeon R9 M395 2048 MB.


Steps to Reproduce: Open a web page such as www.dlptest.com. Select https upload. Attach a file (or not). See the HTTP XHR, webRequests during HTTP POSTS (Ideally our DLP Product would block sensitive information from being posted via HTTP WEB POST using data from the injected script from the Safari Extension, and the SafariExtensionHandler obj-c/swift, which sends HTTP REQUEST Headers and payload info to some sort of classification system.