We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c35ba63 commit 4241ea7Copy full SHA for 4241ea7
src/content/eventsHook.js
@@ -69,16 +69,16 @@ if (location.protocol == "file:") {
69
const request = notify(url, false);
70
// restore full url, notify truncates to dir
71
request.url = url;
72
- if (el.ownerDocument != document) {
73
- request.offscreen = true;
74
- }
+ request.offscreen = !(el?.parentElement?.ownerDocument == document);
75
try {
76
const ph = PlaceHolder.create(request.type, request);
77
ph.replace(!request.offscreen && el);
78
} catch (e) {
79
error(e);
80
}
81
- el.srcset = el.src = "data:";
+ if (el) {
+ el.srcset = el.src = "data:";
+ }
82
blockedList.add(el);
83
};
84
0 commit comments