Create a way to evaluate arbitrary javascript
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- javascript, python
調査の方向性
Start by reading the existing html.script and Django use_query hooks, then review the traceability comment in issue 857. Define how use_script should return JavaScript results, support asynchronous or deferred event execution, and handle the this keyword. Done means the proposed examples have a clear, working interface.
索引モデルが issue の本文から書いたものです。
説明
Current Situation
Currently, there is no method to transmit the results of a JavaScript function to the backend.
Proposed Actions
This might look like a use_script hook that operates similarly to html.script, but can return a result.
For example,
@component
def example():
executor = use_script("getComputedStyle(document.querySelector('#element'))")
return f"CSS Style Attributes: {executor.data}"
Since this hook would need to operate asynchronously, the interface would likely be heavily inspired by our Django use_query hook.
And perhaps it could be used as an executor within event contexts to be more "reactive":
@component
def example():
executor = use_script("getComputedStyle(document.querySelector('#element'))", deferred=True)
async def on_click(event):
await executor()
example_value = executor.data
return f"CSS Style Attributes: {script.data}"
See this comment for traceability.
Note: If possible, we should try pre-populate this keyword with something that makes sense, depending on where the JavaScript was executed.
- 主要言語
- Python
- スター
- 8.1k
- フォーク
- 332
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
reactive-python/reactpy のほかの issue
-
Outdated GIF in Docs オープンpriority-3-low type-docs
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
reactive-python/reactpy#1034 ·
-
priority-2-moderate type-revision
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
reactive-python/reactpy#1319 ·
-
priority-1-high
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
reactive-python/reactpy#1277 ·
-
priority-3-low
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
reactive-python/reactpy#1273 · リアクション 1 件 ·
-
priority-2-moderate
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
reactive-python/reactpy#1272 · リアクション 2 件 ·
reactive-python/reactpy の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
bancolombia/sentinel#23 ·
-
test md オープンCI
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
langchain-ai/deepagents#6450 ·
-
bug client
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100