Class HandleErrors

Handles possible errors when using Ayncat.

Hierarchy

  • HandleErrors

Constructors

Methods

  • Verifies that the two style objects have the same properties and their values are of the same type.

    Example

    dataTypes({margin: "3px", padding:"7px"}, {margin:"5px"}): throw Error
    

    Example

    dataTypes({margin: "3px"}, {margin:"5px"}): void
    

    Parameters

    • prevStyle: Partial<CSSStyleDeclaration>
    • newStyle: Partial<CSSStyleDeclaration>

    Returns void

  • Make sure css values are of the same type, to avoid a malfunction when incrementing them.

    Example

    intDataTypesEqual("12px", "12pt", "margin"): throw Error
    intDataTypesEqual("12px", "12px", "margin"): void

    Parameters

    • prevValue: string
    • newValue: string
    • property: string

    Returns void

  • Check for the existence of the style tag with id "ayncatstyles" as this is where the css styles will be injected.

    Example

    styleTag(): HTMLStyleElement
    

    Returns HTMLStyleElement

Generated using TypeDoc