Options
All
  • Public
  • Public/Protected
  • All
Menu

Module @tmorin/ceb-bundle-web

Index

Type aliases

AttributeListenerData

AttributeListenerData: { attrName: string; newVal: any; oldVal: any }

The data of provided by an AttributeListener.

Type declaration

  • attrName: string

    The attribute name.

  • newVal: any

    The new value.

  • oldVal: any

    The old value.

FieldListenerData

FieldListenerData<T>: { attrName: string; newVal: T; oldVal: T; propName: string }

The data of provided by a FieldListener.

Type parameters

  • T = unknown

Type declaration

  • attrName: string

    The attribute name.

  • newVal: T

    The new value.

  • oldVal: T

    The old value.

  • propName: string

    The property name.

Protected HookCallbacks

HookCallbacks<E>: { adoptedCallback: any; attributeChangedCallback: any; connectedCallback: any; constructorCallback: any; disconnectedCallback: any }

The callbacks executed by the hooks.

Type parameters

  • E: HTMLElement = HTMLElement

    the type of the Custom Element

    This API is dedicated for developer of Builders.

Type declaration

  • adoptedCallback:function
    • adoptedCallback(el: E): void
    • Parameters

      • el: E

      Returns void

  • attributeChangedCallback:function
    • attributeChangedCallback(el: E, attName: string, oldVal: null | string, newVal: null | string): void
    • Parameters

      • el: E
      • attName: string
      • oldVal: null | string
      • newVal: null | string

      Returns void

  • connectedCallback:function
    • connectedCallback(el: E): void
    • Parameters

      • el: E

      Returns void

  • constructorCallback:function
    • constructorCallback(el: E): void
    • Parameters

      • el: E

      Returns void

  • disconnectedCallback:function
    • disconnectedCallback(el: E): void
    • Parameters

      • el: E

      Returns void

TemplateParameters

TemplateParameters: { greyDom: boolean }

The common parameters of the rendering.

Type declaration

  • greyDom: boolean

    When true, the rendering solution render the template with a scope.

Functions

html

  • html(strings: TemplateStringsArray, ...args: any[]): Template<UpdateParameters>
  • This function is a tag function which converts a literal statement to a Template. The template can then be used to update the DOM.

    example

    Render a simple greeting

    import {Template} from "@tmorin/ceb-templating-builder"
    import {html} from "@tmorin/ceb-templating-literal"
    const name = "World"
    const template : Template = html`<p>Hello, ${name}!</p>`
    template.render(document.body)

    Parameters

    • strings: TemplateStringsArray

      the strings

    • Rest ...args: any[]

      the arguments

    Returns Template<UpdateParameters>

Generated using TypeDoc