developit / developit/htm

Lost static parts and fields information + top level caller

Abierto
#143 5 comentarios 1 reacción 0 asignados Ver en GitHub
Lenguaje dominante
JavaScript
Estrellas
9k
Forks
181
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.