Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ApplyOptions

Options for applying micro data.

Hierarchy

  • ApplyOptions

Index

Properties

Optional dataFormatter

dataFormatter: (data: string, elementData: DOMStringMap) => string

Format the text for a data element.

remarks

If not given, the content of the data element is left alone.

Type declaration

    • (data: string, elementData: DOMStringMap): string
    • Parameters

      • data: string
      • elementData: DOMStringMap

      Returns string

Optional linkFormatter

linkFormatter: (data: string, elementData: DOMStringMap) => null | string

Format the text for a HyperLink.

remarks

If not given or returns null, the content of the link is left alone.

Type declaration

    • (data: string, elementData: DOMStringMap): null | string
    • Parameters

      • data: string
      • elementData: DOMStringMap

      Returns null | string

Optional timeFormatter

timeFormatter: (data: string, elementData: DOMStringMap) => string

Format the text for a time element.

remarks

If not given, the content of the time element is left alone.

Type declaration

    • (data: string, elementData: DOMStringMap): string
    • Parameters

      • data: string
      • elementData: DOMStringMap

      Returns string

Optional typeHelpers

typeHelpers: {}

Methods that allow for special handling for types.

remarks

If a method returns false, then the properties of the item still go through the usual logic.

Type declaration

  • [t: string]: (data: Thing, element: HTMLElement) => boolean

    Map from type to special handler.

    remarks

    If the method returns false, then the properties of the item still go through the usual logic.

      • (data: Thing, element: HTMLElement): boolean
      • Parameters

        • data: Thing
        • element: HTMLElement

        Returns boolean

Generated using TypeDoc