webworkers - initial startup helper

オープン
#207 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
32/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
python
領域
documentation

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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')]
主要言語
Python
スター
17
フォーク
20
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

pyscript/docs のほかの issue

pyscript/docs の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。