Welcome to mirror list, hosted at ThFree Co, Russian Federation.

x-id.js « directives « src « alpinejs « packages « alpinejs - github.com/gohugoio/hugo-mod-jslibs-dist.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 897f279980fa6ac3599ea73d42b7c0f69c0539a8 (plain)
1
2
3
4
5
6
7
8
import { directive } from "../directives"
import { setIdRoot } from '../ids'

directive('id', (el, { expression }, { evaluate }) => {
    let names = evaluate(expression)
    
    names.forEach(name => setIdRoot(el, name))
})