bigskysoftware / bigskysoftware/_hyperscript
behavior does not init properly when parameters are "optional"
- 主要言語
- JavaScript
- スター
- 3.8k
- フォーク
- 172
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
I'm using Hyperscript 0.9.12 and attempting to do something similar to what the [Draggable](https://gist.github.com/dz4k/6505fb82ae7fdb0a03e6f3e360931aa9) example does. Default to "me" if a specific click target is not passed in.
The init block does not work.
```
behavior alertMe(clickElement)
init
if no clickElement set the clickElement to me
end
on click from clickElement
call alert('behavior is working!')
end
end
click me
click me
```
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
Hyperscript 0.9.12 の 2 つの動作例を再現し、その後、behavior init が省略されたオプションパラメータと `clickElement` 参照をどのように処理するかを追跡します。`install alertMe()` がデフォルトでクリック対象を `me` に設定し、明示的な `clickElement: me` のケースも引き続き動作すれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript
- 領域
- frontend
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100