Skip to content

Commit 25cc403

Browse files
ion1aklinker1
andauthored
refactor: Use script.text instead of innerHTML in injectScript (#1764)
Co-authored-by: Aaron <[email protected]>
1 parent 923312c commit 25cc403

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/wxt/src/utils/inject-script.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export async function injectScript(
2828

2929
if (browser.runtime.getManifest().manifest_version === 2) {
3030
// MV2 requires using an inline script
31-
script.innerHTML = await fetch(url).then((res) => res.text());
31+
script.text = await fetch(url).then((res) => res.text());
3232
} else {
3333
// MV3 requires using src
3434
script.src = url;

0 commit comments

Comments
 (0)