Class Index | File Index

Classes


Namespace eniro.maps.event


Defined in: event.js.

Namespace Summary
Constructor Attributes Constructor Name and Description
 
This namespace holds event functions.
Method Summary
Method Attributes Method Name and Description
<static>  
eniro.maps.event.addDomListener(node, eventName, fn)
Cross browser way of registering the given function as a listener for the given DOM event name on the given object.
<static>  
eniro.maps.event.addDomListenerOnce(node, eventName, the)
Identical to eniro.maps.event.addDomListener but removes the function as a listener after it has been executed once.
<static>  
eniro.maps.event.addListener(obj, eventName, fn)
Adds the given function as a listener for the given event name on the given object.
<static>  
eniro.maps.event.addListenerOnce(obj, eventName, fn)
Identical to eniro.maps.event.addListener but removes the function as a listener after it has been executed once.
<static>  
eniro.maps.event.clearInstanceListeners(obj)
Removes all listeners for all events from the given object.
<static>  
eniro.maps.event.clearListeners(obj, eventName)
Removes all listeners for the given event name from the given object.
<static>  
eniro.maps.event.removeListener(listener)
Removes the given listener that is an instance of eniro.maps.MapsEventListener returned by eniro.maps.event.addListener.
<static>  
eniro.maps.event.stop(event, allowDefault)
Stops the given event from bubbling and optionally stops the default action.
<static>  
eniro.maps.event.trigger(obj, eventName, args)
Triggers the given event on the given object.
Namespace Detail
eniro.maps.event
This namespace holds event functions.
Method Detail
<static> {eniro.maps.MapsEventListener} eniro.maps.event.addDomListener(node, eventName, fn)
Cross browser way of registering the given function as a listener for the given DOM event name on the given object.
Parameters:
{Node} node
the node to add a listener to.
{string} eventName
the event name to add the listener for (e.g. 'click').
{Function} fn
the callback to invoke as the listener.
Returns:
{eniro.maps.MapsEventListener} an instance that can be used with eniro.maps.event.removeListener to remove the listener.

<static> {eniro.maps.MapsEventListener} eniro.maps.event.addDomListenerOnce(node, eventName, the)
Identical to eniro.maps.event.addDomListener but removes the function as a listener after it has been executed once.
Parameters:
{Node} node
the node to add a listener to.
{string} eventName
the event name to add the listner for (e.g. 'click').
{Function} the
callback to invoke as the listener.
Returns:
{eniro.maps.MapsEventListener} an object that is used to remove the listener in eniro.maps.event.removeListener.

<static> {eniro.maps.MapsEventListener} eniro.maps.event.addListener(obj, eventName, fn)
Adds the given function as a listener for the given event name on the given object.
Parameters:
{Object} obj
the object to add the listener to.
{string} eventName
the event name to add the listener for (e.g. 'click').
{Function} fn
the callback to invoke as the listener.
Returns:
{eniro.maps.MapsEventListener} an instance that can be used with eniro.maps.event.removeListener to remove the listener.

<static> {eniro.maps.MapsEventListener} eniro.maps.event.addListenerOnce(obj, eventName, fn)
Identical to eniro.maps.event.addListener but removes the function as a listener after it has been executed once.
Parameters:
{Object} obj
the object to add a listener to.
{string} eventName
the event name to add the listener for (e.g. 'click').
{Function} fn
the callback to invoke as the listener.
Returns:
{eniro.maps.MapsEventListener} an instance that can be used with eniro.maps.event.removeListener to remove the listener.

<static> eniro.maps.event.clearInstanceListeners(obj)
Removes all listeners for all events from the given object.
Parameters:
{Object} obj
the object to remove all event listeners from.

<static> eniro.maps.event.clearListeners(obj, eventName)
Removes all listeners for the given event name from the given object.
Parameters:
{Object} obj
the object to remove all event listeners from.
{string} eventName
the event name to remove all listeners for.

<static> eniro.maps.event.removeListener(listener)
Removes the given listener that is an instance of eniro.maps.MapsEventListener returned by eniro.maps.event.addListener.
Parameters:
{eniro.maps.MapsEventListener} listener
the listener to remove.

<static> eniro.maps.event.stop(event, allowDefault)
Stops the given event from bubbling and optionally stops the default action.

Example:
// Stops the click event from bubbling and following the link.
eniro.maps.event.addListener(myLink, 'click', eniro.maps.event.stop);
Parameters:
{DOMEvent} event
the event to stop.
{boolean} allowDefault Optional, Default: false
if the default action is allowed.

<static> eniro.maps.event.trigger(obj, eventName, args)
Triggers the given event on the given object. All listeners registered for the given event on the given object will be executed. All arguments passed after eventName are passed as arguments to each listener.
Parameters:
{Object} obj
the object to trigger the event on.
{string} eventName
the event to trigger.
{Mixed} args
any additional arguments.

Documentation generated by JsDoc Toolkit 2.3.2 on Mon Mar 30 2020 12:10:03 GMT+0200 (CEST)