Function consume

  • Consume the given event, using stopPropagation() if present or returnValue if not, and optionally also calling preventDefault().

    Parameters

    • e: Event

      Event to consume

    • OptionaldoNotPreventDefault: boolean

      Defaults to false, meaning preventDefault() will be invoked on the event. Set to true if you do not wish for that to happen.

    Returns void

Version :