-
Notifications
You must be signed in to change notification settings - Fork 443
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: allow to specify a scope for text/partytown scripts #624
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@aaa123eee so if I understand correctly, you would like a discriminant to define which scripts to re-execute in case of fallback and which not, right? |
generally yes currently fallback logic takes all scripts to the main thread regardless a need to do so |
Can you share some examples please? |
ouch, seems that I forgot about this one and removed the repo, I will redo it
@gioboa here are usages examples:
|
I see, thanks for your explanation. |
What is it?
Description
We have our custom "text/partytown" scripts added to the document which meant to be executed only in the worker scope.
If the fallback happens, we have to check an execution scope to avoid errors,
like
typeof WorkerGlobalScope === 'undefined'
I suggest more elegant way of settling a scope for a script
Checklist: