Contents

removeEventListener(eventType, listener, thisObject)

Unsubscribes a listener function from an event type.

Declaration

removeEventListener(
        eventType?: string,
        listener?: MapKitEventListener,
        thisObject?: object | null,
    ): boolean;

Parameters

  • type:

    The type of event, for example, a "configuration-change".

  • listener:

    The callback function to remove. Not setting this parameter removes all listeners of the specified type.

  • thisObject:

    An object MapKit JS sets as the this keyword on the listener function.

Mentioned in

Discussion

Unlike a DOM EventTarget, a MapKitEventTarget doesn’t go through bubbling or capturing phases. The system also interprets the second and the third parameters differently from the DOM’s EventTarget.