Page rendering specifier.

Configures @RenderPage decorator.

Hierarchy

  • Omit<RenderFragmentDef.Spec, "when" | "on">
    • Spec

Properties

Page fragment to include.

By default uses custom element identifier if present, or element tag name otherwise.

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.

Methods

  • Builds content key for the given page.

    The loaded content will replace already included one only when their content key differ.

    By default, uses page URL without hash part as a key. This prevents content refresh when only URL hash changes.

    Returns

    Content key.

    Parameters

    • this: void
    • page: Page

      Target page. Either loaded or not.

    Returns unknown

  • 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