ampproject / ampproject/worker-dom

script elements

Open
#23 1 comment 0 reactions 1 assignee Claimed by @kristoferbaxter View on GitHub
hydration mutation
Dominant language
TypeScript
Stars
3.3k
Forks
154
PR merge metrics
No merged PRs in 30d

Description

We need to design/decide what adding a script elements via worker-dom does. This may also need to be configurable.

Currently it would just do it and execute the script on the main thread. Which would be right for some use cases. But for other cases, such as when using code splitting, one might want to run the script inside the worker.

In that case, we may "neuter" the script element and instead use `importScript` to load the script. I believe that `importScript` is sync, so we may need to instead `fetch` the script and then call `importScript` with a blob (is that supported?)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.