json-dom
    Preparing search index...

    Function fullRemoveEventListener

    • Find and remove a listener that was registered by name (e.g. via fullAddEventListener) - the counterpart to fullAddEventListener. Resolves name the same way fullAddEventListener defaults it, so a caller only needs the original listener function (not the internal name string it was registered under) to remove it:

      1. Resolve name (defaults to listener.name, same as fullAddEventListener).
      2. removeEventListener - find the descriptor by that name, detach it from the element if active, and splice it out of item.eventListeners.

      Does not remove the function from the root DomItem's eventActions registry, since that name may still be shared by other DomItems - see registerListener.

      Parameters

      • eventName: string

        The name of the trigger event (e.g. 'click').

      • listener: ListenerFunction

        The same function originally passed to fullAddEventListener.

      • name: string | null | undefined

        The name the listener was registered under in eventActions.

      • customArgs: object | null | undefined

        The custom args the listener was registered with.

      • options: ListenerOptions | null | undefined

        The options the listener was registered with.

      • item: DomItem

        The DomItem to remove the listener from.

      Returns DomItem

      The same DomItem, with the matching listener removed if one was found.