You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the "loadScriptsOnMainThread" option uses strict string equality to determine if a script should be executed on the main thread. However, this approach is not flexible when URLs contain query parameters.
Describe the solution you'd like
I suggest changing this behavior to partial string matching or allowing the use of regular expressions to match URLs.
Something like this
// index.htmlwindow.partytown={
...
loadScriptsOnMainThread: ["https://googleads.g.doubleclick.net/pagead/viewthroughconversion/"],}// partytown-ww-sw.js// url may be like: "https://googleads.g.doubleclick.net/pagead/viewthroughconversion/123123123/?random=123123&cv=12&fst=1232123&bg=ffffff&guid=ON&..."constshouldExecuteScriptViaMainThread=config.loadScriptsOnMainThread.some(scriptUrl=>decodeURIComponent(url).includes(scriptUrl),)
Describe alternatives you've considered
Additional context
No response
The text was updated successfully, but these errors were encountered:
Partytown moves to QwikDev organization, this is a new beginning for the project. So it's time to clarify the status and clean up the current state a bit. This issue was automatically marked as deprecated and closed because it was not detected recent activity for 8 months, date of latest version. If this issue is still relevant, feel free to comment below and the maintainers will reopen it. Thank you for your contributions.
Is your feature request related to a problem?
Currently, the "loadScriptsOnMainThread" option uses strict string equality to determine if a script should be executed on the main thread. However, this approach is not flexible when URLs contain query parameters.
Describe the solution you'd like
I suggest changing this behavior to partial string matching or allowing the use of regular expressions to match URLs.
Something like this
Describe alternatives you've considered
Additional context
No response
The text was updated successfully, but these errors were encountered: