developit / developit/htm

Lost static parts and fields information + top level caller

未关闭
#143 5 条评论 1 个 reaction 已指派 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 摘要。