Is it possible to use the integrated UI utilities in the MAIN world? #1451
Unanswered
davestewart
asked this question in
Q&A
Replies: 1 comment
-
We could make the context optional... Feel free to open a PR! Just need to add an overload that doesn't use it. Or, you could fake it: createShadowRootUi(new AbortController() as ContentScriptContext, ...) That should be enough. Didn't test it out myself, just off the top of my head. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I understand that the
defineContentScript()
main()
method does not receive any context when running in theMAIN
world.This being the case, how would I leverage the UI utilities such as
createShadowRootUi()
?In my existing extension (I'm migrating) I run in main as I'm accessing a global JS API that is available in the page:
Or perhaps there is another way to do it in WXT?
Beta Was this translation helpful? Give feedback.
All reactions