developit / developit/htm

Lost static parts and fields information + top level caller

オープン
#143 コメント 5 件 リアクション 1 件 担当者 0 名 GitHub で見る
主要言語
JavaScript
スター
9k
フォーク
181
PR マージ指標
30日以内にマージされた PR はありません

説明

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

```js
wrap(() => h('div', {}, h('span')), statics, ...fields);
```

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

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

評価

この issue はまだ評価されていません。

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

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