Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Functions

Functions

setAttr

  • setAttr(element: HTMLElement | Element | NodeListOf<Element>, attributes: PlainObject<string | number | boolean | null>): void
  • setAttr(element: HTMLElement | Element | NodeListOf<Element>, attributeName: string, value: string | number | boolean | null): void
  • Sets / removes a given attribute from the list of given elements

    Parameters

    • element: HTMLElement | Element | NodeListOf<Element>

      the element / elements to set or remove the attribute for

    • attributes: PlainObject<string | number | boolean | null>

      An object where key is the name of the attribute and value is the value to set

    Returns void

  • Sets / removes a given attribute from the list of given elements

    Parameters

    • element: HTMLElement | Element | NodeListOf<Element>

      the element / elements to set or remove the attribute for

    • attributeName: string

      The attribute to set / remove

    • value: string | number | boolean | null

      If null is given the attribute will be removed, otherwise the attribute will be set to this value

    Returns void

Generated using TypeDoc