Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Use document.append() only when there are no elements in
the DOM, as a document instance can't have more than one
direct child.
  • Loading branch information
gorhill committed May 24, 2023
1 parent d5804dc commit 9134c11
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion platform/firefox/vapi-background-ext.js
Expand Up @@ -315,7 +315,7 @@ vAPI.scriptletsInjector = ((doc, details) => {
script = doc.createElement('script');
script.async = false;
script.src = url;
doc.append(script);
(doc.head || doc.documentElement || doc).append(script);
self.uBO_scriptletsInjected = details.filters;
} catch (ex) {
}
Expand Down

0 comments on commit 9134c11

Please sign in to comment.