Gleam - v1.0.2
    Preparing search index...

    Function doWhilePressed

    • Calls callback on pointerdown of the matched element, then keeps calling it every delay ms until pointerup or pointercancel. Uses pointer capture so the action persists while the cursor drags off the element (and over descendants). Unifies mouse, touch, and pen. Throws if no element matches. Returns a dispose function that removes the listeners and stops any in-flight interval.

      Parameters

      • querySelector: string
      • callback: () => void
      • delay: number = 200

      Returns () => void