Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace DOMUtils

The namespace for DOM utilities.

Index

Functions

createDomID

  • createDomID(): string
  • Create a DOM id with prefix "id-" to solve bug for UUIDs beginning with numbers.

    Returns string

findElement

  • findElement(parent: HTMLElement, className: string): HTMLElement
  • Find the first element matching a class name.

    Parameters

    • parent: HTMLElement
    • className: string

    Returns HTMLElement

findElements

  • findElements(parent: HTMLElement, className: string): HTMLCollectionOf<HTMLElement>
  • Find the first element matching a class name.

    Parameters

    • parent: HTMLElement
    • className: string

    Returns HTMLCollectionOf<HTMLElement>

hitTestNodes

  • hitTestNodes(nodes: HTMLElement[] | HTMLCollection, x: number, y: number): number
  • Get the index of the node at a client position, or -1.

    Parameters

    • nodes: HTMLElement[] | HTMLCollection
    • x: number
    • y: number

    Returns number

Generated using TypeDoc