developit / developit/htm

Lost static parts and fields information + top level caller

Ouverte
#143 5 commentaires 1 réaction 0 personnes assignées Voir sur GitHub
Langage dominant
JavaScript
Étoiles
9k
Forks
181
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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);
```

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.