Index: include.preload.js
===================================================================
--- a/include.preload.js
+++ b/include.preload.js
@@ -131,41 +131,42 @@
return urls;
}
-function isCollapsibleMediaElement(element, mediatype)
+function getSelectorForBlockedElement(element)
{
- if (mediatype != "MEDIA")
- return false;
-
- if (!element.getAttribute("src"))
- return false;
+ // Microsoft Edge does not support CSS.escape(). However, it doesn't
+ // support user style sheets either. So the selector would be added
+ // with an author style sheet anyway, which doesn't provide any benefits.
+ if (!("escape" in CSS))
+ return null;
- for (let child of element.children)
+ // Setting the "display" CSS property to "none" doesn't have any effect on
+ // elements (in framesets). So we have to hide it inline through
+ // the "visibility" CSS property.
+ if (element.localName == "frame")
+ return null;
+
+ // If the