Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Improve extraHeaders feature detection (#787)
On Firefox forks the runtime.isFirefox detection was failing because the browser name was not 'Firefox'. This lead to an error when registering webRequest listeners as the extraHeaders option is not needed, preventing the extension from loading. There is an extension API that can be used to detect support for this option: OnBeforeSendHeadersOptions. This fix updates the feature detection check to explicitly look for this API. We also check to for the presence of OnBeforeSendHeadersOptions as it does not exist on Edge.
- Loading branch information