Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Renderable

The Renderable class is part of the most basic unit of Aych. This abstract class provides foundational logic for renderable child class to inherit and use. A renderable, conceptually, is a class that has a render method that can be called to get a string representation of that class.

Hierarchy

Properties

Accessors

Methods

Properties

Protected templates

templates: SimpleObject

Accessors

r

  • get r(): string
  • Getting for the HTML returned by the render function.

    Returns string

Methods

append

  • Appends templates to the existing templates object.

    Parameters

    • templates: SimpleObject

      Key-value pairs that map to a template rendered in StringLiteral's

    • Default value prioritize: boolean = false

      Whether or not to allow appended templates to override existing template properties

    Returns Renderable

Protected Abstract internalRender

  • The internal render functions is used to define how a subclass renders itself.

    Parameters

    • templates: SimpleObject

      Key-value pairs that map to a template rendered in StringLiteral's

    Returns string

render

  • Renders the internalRender function.

    Parameters

    Returns string

toString

  • toString(): string
  • Overrides the toString method called by JavaScript when string concatenate occurs

    Returns string

when

  • Turn on and off the ability for this element to render

    Parameters

    • condition: boolean

      The condition that determines whether or not the element can render.

    Returns Renderable

with

  • Sets the templates.

    Parameters

    • templates: SimpleObject

      Key-value pairs that map to a template rendered in StringLiteral's

    Returns Renderable

Generated using TypeDoc