Generates a unique CSS selector for a given DOM element.

Constructors

Methods

Constructors

Methods

  • Generates a unique CSS selector for the provided element.

    Parameters

    • element: Element

      The DOM element for which to generate a selector.

    Returns string

    A unique CSS selector string.

    Will throw an error if a unique selector cannot be generated.