Represents the functionality a native google maps object which emits events should provide.
IGoogleMapsNativeObjectWrapper
core/abstraction/base/i-google-maps-native-object-emitting-wrapper.ts
Methods |
clearListeners |
clearListeners()
|
Unregisters all handlers for all events from the native object.
Returns:
void
|
listenTo | ||||||||||||
listenTo(eventName: string, handler: (args: any[]) => void)
|
||||||||||||
Registers an event handler on the native object.
Parameters:
Returns:
void
A function which can be used to unregister that specific handler. |
||||||||||||
stopListeningTo | ||||||||
stopListeningTo(eventName: string)
|
||||||||
Unregisters all handlers for the specified event from the native object.
Parameters:
Returns:
void
|
||||||||
import { IGoogleMapsNativeObject } from '../native/i-google-maps-native-object';
import { IGoogleMapsNativeObjectWrapper } from './i-google-maps-native-object-wrapper';
/**
* Represents the functionality a native google maps object which emits events should provide.
*
* @export
* @interface IGoogleMapsNativeObjectEmittingWrapper
* @extends {IGoogleMapsNativeObjectWrapper<TNative>}
* @template TNative The type of emitting native object.
*/
export interface IGoogleMapsNativeObjectEmittingWrapper<TNative extends IGoogleMapsNativeObject>
extends IGoogleMapsNativeObjectWrapper<TNative>
{
/**
* Registers an event handler on the native object.
*
* @param {string} eventName The name of the native event to listen to.
* @param {(...args: any[]) => void} handler The function that will handle the event.
* @returns {() => void} A function which can be used to unregister that specific handler.
*/
listenTo(eventName: string, handler: (...args: any[]) => void): () => void;
/**
* Unregisters all handlers for the specified event from the native object.
*
* @param {string} eventName The name of the event for which handlers should be cleared.
*/
stopListeningTo(eventName: string): void;
/** Unregisters all handlers for all events from the native object. */
clearListeners(): void;
}