Skip to content

Latest commit

 

History

History
20 lines (15 loc) · 397 Bytes

el.md

File metadata and controls

20 lines (15 loc) · 397 Bytes

Lithen Functions - el

el is a tagged template function that works just like the html function. But returns only the first element.

Previously used with html.first.

It returns a ChildNode, the first element of the document fragment created by the html tag function.

Usage

const value = 10

el`
  <div>Value: ${value}</div>
`
// or
el(['<div>Value: ','</div>'], value)