webworkers - initial startup helper
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 32/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- python
- Domain
- documentation
Research direction
Start by locating the webworkers documentation entry point and comparing the current 2026.1.1 API with the older snippet in this issue. Determine whether a startup helper belongs in the docs and verify that the documented example matches the current worker-loading behavior; done means the intended pre-initialization guidance is current and usable.
Written by the indexing model from the issue text.
Description
New docs are looking great. 👍
Was looking through webworkers and thought you might want to add a starter function which might be used when the page starts up to pre-initialise the workers so they are ready sooner.
I took this from a prior code version so it probably needs some refining, updating to 2026.1.1, and to be in a function
but something like this could be useful to add
# start workers but no handles to use and have to wait - so use ltk.schedule instead
for el in window.document.querySelectorAll("[type='py'][worker][name]"):
print("found",el, el.id)
print(workers, workers.id, workers.name)
el.onload(ltk.proxy(lambda e: print("loaded",e)))
print(dir(el))
await workers[el.getAttribute('name')]
- Dominant language
- Python
- Stars
- 17
- Forks
- 20
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from pyscript/docs
-
Difficulty 1/5 Under an hour Newbie friendliness 65/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
-
Difficulty 3/5 1-2 days Newbie friendliness 30/100
Similar issues
-
documentation help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
simonw/sqlite-utils#872 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100