| Index: include.preload.js |
| diff --git a/include.preload.js b/include.preload.js |
| index 02661d39c86ace26fcddea8395726dddf7018df8..2b89e11b38bb3a8a297f19e32697e11b9282806b 100644 |
| --- a/include.preload.js |
| +++ b/include.preload.js |
| @@ -457,20 +457,23 @@ function init(document) |
| shadow.appendChild(document.createElement("shadow")); |
| // Stop the website from messing with our shadowRoot |
| - runInDocument(document, function() |
| + if ("shadowRoot" in Element.prototype) |
| { |
| - var ourShadowRoot = document.documentElement.shadowRoot; |
| - var desc = Object.getOwnPropertyDescriptor(Element.prototype, "shadowRoot"); |
| - var shadowRoot = Function.prototype.call.bind(desc.get); |
| + runInDocument(document, function() |
| + { |
| + var ourShadowRoot = document.documentElement.shadowRoot; |
| + var desc = Object.getOwnPropertyDescriptor(Element.prototype, "shadowRoot"); |
| + var shadowRoot = Function.prototype.call.bind(desc.get); |
| - Object.defineProperty(Element.prototype, "shadowRoot", { |
| - conifgurable: true, enumerable: true, get: function() |
| - { |
| - var shadow = shadowRoot(this); |
| - return shadow == ourShadowRoot ? null : shadow; |
| - } |
| - }); |
| - }, null); |
| + Object.defineProperty(Element.prototype, "shadowRoot", { |
| + conifgurable: true, enumerable: true, get: function() |
| + { |
| + var shadow = shadowRoot(this); |
| + return shadow == ourShadowRoot ? null : shadow; |
| + } |
| + }); |
| + }, null); |
| + } |
| } |
| function addElemHideSelectors(selectors) |