Dynamic prop/attr names
- Langage dominant
- JavaScript
- Étoiles
- 9k
- Forks
- 181
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
Not the same as #109.
That would be useful to have insertable attribute names:
```js
html``
// same as
html``
```
## Practical cases
Optional attributes:
```js
html``
```
Private props:
```js
let html = htm.bind(h)
let _data = Symbol('data')
html``
function h (tag, props) {
props[_data]
}
```
Anonymous props:
```js
html``
function draggable(el) {
...
}
draggable[Symbol.toPrimitive] = () => 'data-draggable'
```
@developit @jviide would you consider that feature?
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
No file or test is named in the issue; start by reading issue #109 alongside the examples here to define the intended distinction. Use the optional, private, and anonymous prop examples as acceptance cases; done means the feature supports these forms without conflating them with #109.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- javascript
- Domaine
- frontend, web-dev
- Type d'issue
- Fonctionnalité
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100