Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "lib/lit-extended"

Index

Functions

extendedPartCallback

  • A PartCallback which allows templates to set properties and declarative event handlers.

    Properties are set by default, instead of attributes. Attribute names in lit-html templates preserve case, so properties are case sensitive. If an expression takes up an entire attribute value, then the property is set to that value. If an expression is interpolated with a string or other expressions then the property is set to the string result of the interpolation.

    To set an attribute instead of a property, append a $ suffix to the attribute name.

    Example:

    html`<button class$="primary">Buy Now</button>`
    

    To set an event handler, prefix the attribute name with on-:

    Example:

    html`<button on-click=${(e)=> this.onClickHandler(e)}>Buy Now</button>`
    

    Parameters

    Returns Part

html

  • html(strings: TemplateStringsArray, ...values: any[]): TemplateResult
  • Interprets a template literal as a lit-extended HTML template.

    Parameters

    • strings: TemplateStringsArray
    • Rest ...values: any[]

    Returns TemplateResult

svg

Generated using TypeDoc