Index: lib/requestBlocker.js |
=================================================================== |
--- a/lib/requestBlocker.js |
+++ b/lib/requestBlocker.js |
@@ -30,7 +30,8 @@ |
const devtools = require("devtools"); |
// Chrome can't distinguish between OBJECT_SUBREQUEST and OBJECT requests. |
-if (!("OBJECT_SUBREQUEST" in chrome.webRequest.ResourceType)) |
+if (chrome.webRequest.ResourceType && |
Sebastian Noack
2017/06/23 16:02:01
Assuming that Microsoft Edge does not report reque
Oleksandr
2017/06/26 07:28:08
Not only does Edge not report object_subrequest, i
Sebastian Noack
2017/06/28 13:51:39
The question is how likely is it that they start r
|
+ !("OBJECT_SUBREQUEST" in chrome.webRequest.ResourceType)) |
RegExpFilter.typeMap.OBJECT_SUBREQUEST = RegExpFilter.typeMap.OBJECT; |
// Map of content types reported by the browser to the respecitve content types |
@@ -186,7 +187,10 @@ |
// Chrome 58 onwards directly supports WebSocket blocking, so we can ignore |
// messages from the wrapper here (see https://crbug.com/129353). Hopefully |
// WebRTC will be supported soon too (see https://crbug.com/707683). |
- if (msg.requestType.toUpperCase() in chrome.webRequest.ResourceType) |
+ // Edge supports neither webRequest.ResourceType nor WebSocket blocking yet: |
+ // https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/10297376/ |
+ if (chrome.webRequest.ResourceType && |
+ (msg.requestType.toUpperCase() in chrome.webRequest.ResourceType)) |
return false; |
return ext.webRequest.onBeforeRequest._dispatch( |