Palette
    Preparing search index...

    Function html

    • Create an HTMLTemplateElement from the provided HTML string.

      These HTML Templates can be used as standard HTML Templates, or as the foundation for a Component or standalone Template

      Interpolates values in the template string to provide helpers for composing templates:

      • HTMLTemplateElement references are serialized to HTML and inlined
      • Strings are modified to become tags with the ::swap directive set to the string value. This is helpful shorthand for content placeholders.

      Parameters

      • strings: TemplateStringsArray
      • ...values: (
            | HTMLTemplateElement
            | `@${string}`
            | `$${string}`
            | `#${string}`
            | `*${string}`
            | typeof Component
        )[]

      Returns HTMLTemplateElement

      This template string

      const $template = html`
      <div :class="*classnames">
      ${"@content"}
      </div>
      `

      Produces this template element (portrayed as HTML)

      <template>
      <div :class="*classnames">
      <span ::swap="@content"></span>
      </div>
      </template>