| Index: inject.preload.js |
| diff --git a/inject.preload.js b/inject.preload.js |
| index 0f81da6f8ff60ea4a108ef87e307dc908f1d50a3..c5d663cefa10af5c9271a8b43eaa7ab18b0559ce 100644 |
| --- a/inject.preload.js |
| +++ b/inject.preload.js |
| @@ -357,8 +357,17 @@ function injected(eventName, injectedIntoContentWindow) |
| if (document instanceof HTMLDocument) |
| { |
| - let sandbox = window.frameElement && |
| - window.frameElement.getAttribute("sandbox"); |
| + let sandbox; |
| + |
| + // We have to wrap the following code in a try catch |
| + // because of this Microsoft Edge bug: |
| + // https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/19082980/ |
| + try |
| + { |
| + sandbox = window.frameElement && |
| + window.frameElement.getAttribute("sandbox"); |
| + } |
| + catch (e) {} |
| if (typeof sandbox != "string" || /(^|\s)allow-scripts(\s|$)/i.test(sandbox)) |
| { |