Fragment rendering specifier.

Hierarchy

  • Spec
    • Spec

Properties

Methods

Properties

on?: StatePath | EventSender<[]>

A trigger that issues rendering.

This can be useful e.g. when component has multiple independent sub-views.

This can be one of the following:

  • A path to component state part the renderer should track. The rendering would trigger only when the target state part is updated.
  • Arbitrary event sender. The rendering would be triggered on any event from this sender.

A root state path is tracked when omitted.

When trigger is a root path (the default value), then the rendering will be triggered by any state update. Except for updates of sub-states inside RenderPath__root.

settle?: boolean

Whether to settle the rendered fragment contents prior to placing them to target.

When enabled custom elements within rendered contents will be upgraded, then settled by calling DrekFragment.settle() method. This allows nested custom elements to render their contents offline into document fragment prior to placing to the document.

Enabled (true) by default.

when?: "connected" | "settled"

When to start the rendering.

One of:

  • settled (the default) - start rendering when component is ComponentContext.settled settled.
  • connected - start rendering when component's element is ComponentContext.connected connected to document.

Methods

  • Reports rendering error. E.g. a render shot execution failure.

    Parameters

    • this: void
    • Rest ...messages: unknown[]

      Error messages to report.

    Returns void

  • Creates rendering target to place the rendered fragment contents to.

    By default, the content will be wrapped into element with display: contents; CSS style and the wrapper element will be appended to component's content root.

    Returns

    Rendering target.

    Parameters

    • this: void
    • context: ComponentContext<any>

      Component context.

    Returns DrekTarget<[DrekContentStatus]>

Generated using TypeDoc