Replies: 5 comments 2 replies
-
I am able to run it by doing this: const def = defineUnlistedScript(() => {
console.log("offscreen run");
});
console.log("hi offscreen ");
def.main();
export default def; |
Beta Was this translation helpful? Give feedback.
-
You can just run your code directly, no need for You'll need to structure your files like this:
Refer to the popup in the template as an example: https://github.com/wxt-dev/wxt/tree/main/templates%2Fvanilla%2Fentrypoints%2Fpopup |
Beta Was this translation helpful? Give feedback.
-
You can just run your code directly, no need for You'll need to structure your files like this:
Refer to the popup in the template as an example: https://github.com/wxt-dev/wxt/tree/main/templates%2Fvanilla%2Fentrypoints%2Fpopup |
Beta Was this translation helpful? Give feedback.
-
Is there any WXT core messaging for the offscreen document. |
Beta Was this translation helpful? Give feedback.
-
I am getting error when I am doing, entrypoints/
offscreen.html ` <title>Offscreen</title> <script type="module" src="./main.ts"></script>main.ts background.ts ` const onClick = async (tab: Tabs.Tab) => { export default defineBackground({ I am getting ** Failed to load resource: net::ERR_FILE_NOT_FOUND main.ts:1** |
Beta Was this translation helpful? Give feedback.
-
Hi, I am adding an "offscreen" page to my extension, and I am using "Unlisted Pages" and "Unlisted Scripts". (I am actually not sure if this is the right way to do it).
I put
offscreen.html
insideentripoints
. Creating offscreen from existing html is working fine:I would like to load a scrip in
offscreen.html
, but it seems doesn't work. Here is myoffscreen.html
:My
offscreen-main.ts
looks like this:But I cannot see any log or exception in the offscreen page. Is there anything I am doing wrong?
Beta Was this translation helpful? Give feedback.
All reactions