Class TagStyle

Represents the style attribute for an HTML tag.

Constructors

Properties

Accessors

Methods

Constructors

  • Creates a new TagStyle instance.

    Parameters

    • Optional value: string | Record<string, string> | Map<string, string>

      The initial value of the style.

    Returns TagStyle

Properties

value: Map<string, string> = ...

The value of the style.

Accessors

  • get size(): number
  • Returns the number of style properties.

    Returns number

    The number of style properties.

Methods

  • Removes all style properties.

    Returns void

  • Gets a style property.

    Parameters

    • name: string

      The name of the property.

    Returns undefined | string

    The value of the property.

  • Checks whether the style contains a property.

    Parameters

    • name: string

      The name of the property.

    Returns boolean

    true if the style contains the property, otherwise false.

  • Removes a style property.

    Parameters

    • name: string

      The name of the property.

    Returns boolean

  • Sets a style property.

    Parameters

    • Optional name: string

      The name of the property.

    • Optional value: string

      The value of the property.

    Returns void

  • Returns a string representation of the style.

    Returns string

    A string representation of the style.

Generated using TypeDoc