goog.events.listen(myNode, 'click', function(e) { alert('woo') });
goog.events.listen(myNode, 'mouseover', mouseHandler, true);
goog.events.unlisten(myNode, 'mouseover', mouseHandler, true);
goog.events.removeAll(myNode);
goog.events.removeAll();
in IE and event object patching]
goog.events.cleanUp_(type, capture, srcUid, listenerArray)
Cleans up the listener array as well as the listener tree
|
code » | ||||||
|
Dispatches an event (or event like object) and calls all listeners
listening for events of this type. The type of the event is decided by the
type property on the event object.
If any of the listeners returns false OR calls preventDefault then this
function will return false. If one of the capture listeners calls
stopPropagation, then the bubble listeners won't fire.
Arguments:
Returns:
If anyone called preventDefault on the event object (or if any of the handlers returns false) this will also return false. If there are no handlers, or if all handlers return true, this returns true.
|
code » | ||||||
|
Provides a nice string showing the normalized event objects public members
|
code » | ||||||
|
Fires a listener with a set of arguments
Arguments:
Returns:
Result of listener.
|
code » | ||||||
|
Fires an object's listeners of a particular type and phase
|
code » | ||||||
|
Fires an object's listeners of a particular type and phase.
Arguments:
Returns:
True if all listeners returned true else false.
|
code » | ||||||
|
Gets the goog.events.Listener for the event or null if no such listener is
in use.
Arguments:
Returns:
the found listener or null if not found.
|
code » | ||||||
|
Gets the listeners for a given object, type and capture phase.
|
code » | ||||||
|
Gets the listeners for a given object, type and capture phase.
|
code » | ||||||
|
Returns a string wth on prepended to the specified type. This is used for IE
which expects "on" to be prepended. This function caches the string in order
to avoid extra allocations in steady state.
|
code » | ||||||
|
Helper function for returning a proxy function.
Returns:
A new or reused function object.
|
code » | ||||||
|
Gets the total number of listeners currently in the system.
Returns:
Number of listeners.
|
code » | ||||||
|
Creates a unique event id.
|
code » | ||||||
|
Handles an event and dispatches it to the correct listeners. This
function is a proxy for the real listener the user specified.
|
code » | ||||||
|
Returns whether an event target has any active listeners matching the
specified signature. If either the type or capture parameters are
unspecified, the function will match on the remaining criteria.
Arguments:
Returns:
Whether an event target has one or more listeners matching the requested type and/or capture phase.
|
code » | ||||||
|
This is used to check if an IE event has already been handled by the Closure
system so we do not do the Closure pass twice for a bubbling event.
Arguments:
Returns:
True if the event object has been marked.
|
code » | ||||||
|
Adds an event listener for a specific event on a DOM Node or an object that
has implemented goog.events.EventTarget. A listener can only be
added once to an object and if it is added again the key for the listener
is returned.
Arguments:
Returns:
Unique key for the listener.
|
code » | ||||||
|
Adds an event listener for a specific event on a DomNode or an object that
has implemented goog.events.EventTarget. After the event has fired
the event listener is removed from the target.
Arguments:
Returns:
Unique key for the listener.
|
code » | ||||||
goog.events.listenWithWrapper(src, wrapper, listener, opt_capt, opt_handler)
Adds an event listener with a specific event wrapper on a DOM Node or an
object that has implemented goog.events.EventTarget. A listener can
only be added once to an object.
Arguments:
|
code » | ||||||
goog.events.markIeEvent_(e)
This is used to mark the IE event object so we do not do the Closure pass
twice for a bubbling event.
Arguments:
|
code » | ||||||
goog.events.protectBrowserEventEntryPoint(errorHandler)
Installs exception protection for the browser event entry point using the
given error handler.
Arguments:
|
code » | ||||||
|
Removes all listeners from an object, if no object is specified it will
remove all listeners that have been registered. You can also optionally
remove listeners of a particular type or capture phase.
Arguments:
Returns:
Number of listeners removed.
|
code » | ||||||
|
Removes an event listener which was added with listen().
Arguments:
Returns:
indicating whether the listener was there to remove.
|
code » | ||||||
|
Removes an event listener which was added with listen() by the key
returned by listen().
|
code » | ||||||
goog.events.unlistenWithWrapper(src, wrapper, listener, opt_capt, opt_handler)
Removes an event listener which was added with listenWithWrapper().
Arguments:
|
code » |
|
Separator used to split up the various parts of an event key, to help avoid
the possibilities of collisions.
|
Code » | |
|
The root of the listener tree
|
Code » | |
|
Container for storing event listeners and their proxies
|
Code » | |
|
Map of computed on strings for IE event types. Caching this removes an extra
object allocation in goog.events.listen which improves IE6 performance.
|
Code » | |
|
String used to prepend to IE event types. Not a constant so that it is not
inlined.
|
Code » | |
|
Lookup for mapping source UIDs to listeners.
|
Code » | |
|
Counter to create unique event ids.
|
Code » |