Options
All
  • Public
  • Public/Protected
  • All
Menu

Module Renderers\BuiltIn

Index

Functions

basicElement

  • basicElement(__namedParameters: { lang: string; source: BasicElement[]; options: object }): string
  • Renders a HTML element for each element in source.

    The DOM element has the tag specified in the options under the key name, defaults to span.

    The content is the value of the property description on each object in source.

    If a lang is set, it looks for description[lang].

    Any data passed in the attributes key in the options is set as the DOM element attribute.

    Parameters

    • __namedParameters: { lang: string; source: BasicElement[]; options: object }
      • lang: string
      • source: BasicElement[]
      • options: object
        • name: string

    Returns string

    element HTML to be added to the page where the renderer has been invoked.

liDateDescription

  • liDateDescription(__namedParameters: { lang: string; options: unknown; source: LiDateDescription[] }): string
  • Renders a list of li elements to be used in a HTML list.

    The first element of each li is preferably a date, but can also be any value if the data is passed on the raw key.

    If data is passed on the start or end keys, the value is parsed as a date in the current locale if set, else defaults to en.

    Parameters

    Returns string

    the full list, not enclosed in a ul element, generated from the data in source.