Function preventDefault

Returns a function that will call the given handler and prevent the default event behavior.

  • Parameters

    • Optionalhandler: (event: any) => void

      The function to call when the event is triggered.

    Returns (event: any) => void