Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

Lost static parts and fields information + top level caller

未關閉
#143 5 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
5/5
預估耗時
一週以上
新手友好度
25/100
Issue 類型
功能
描述清晰度
需要釐清
活躍度
停滯
技術堆疊
babel, javascript
領域
frontend

研究方向

先比較 runtime path 與 issue 中描述的 babel-plugin-htm 輸出。確定應如何暴露靜態部分、欄位或空洞,以及根 h 呼叫,然後針對這兩種形式驗證提議的 wrapper 形狀。

由索引模型根據 Issue 內容生成。

描述

I was wondering if there is any way to retain this information from the tagged template. The static parts could be used as a cache key for the output of the html`` call.

It's also useful to know which parts are the fields/holes.
Lastly knowing which h call is the root node or top caller.

For the runtime a wrapper function would do the trick I think but babel-plugin-htm compiles to raw h('div', {}, h('span')) calls.

That might need something like

wrap(() => h('div', {}, h('span')), statics, ...fields);
主要語言
JavaScript
星號
9k
分支
181
PR 合併指標
30 天內沒有已合併 PR

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

developit/htm 的其他 Issue

查看 developit/htm 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。