LibraryActive

Lit Static HTML

Module for static HTML templates in Lit, enabling static value support in template literals.

Open source page ↗

Product features

Product features

addController ( controller ): void

attributeChangedCallback ( name , _old , value ): void

Attributes # Permalink to Attributes

Contents: ReactiveElement

Controllers # Permalink to Controllers

Dev mode # Permalink to Dev mode

html

Interprets a template literal as an HTML template that can efficiently render to and update a container.

Import

literal

Tags a string literal so it behaves like part of the static template strings instead of a dynamic value.

ReactiveElement

removeController ( controller ): void

static disableWarning ?: ( warningKind: WarningKind ) => void

static enabledWarnings ?: Array< WarningKind >

static observedAttributes : Array< string >

StaticValue

A value that can't be decoded from ordinary JSON, making it harder for attacker-controlled data to produce a valid StaticValue.

svg

Interprets a template literal as an SVG template that can efficiently render to and update a container.

unsafeStatic

Wraps a string so it behaves like part of the static template strings; unsafe on untrusted content.

withStatic

Wraps a lit-html template tag (html or svg) to add static value support.