-
Notifications
You must be signed in to change notification settings - Fork 16
Open
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')]Metadata
Metadata
Assignees
Labels
No labels