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: boolean
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 » | |||||||
![]()
No description.
|
code » | |||||||
Fires a listener with a set of arguments
Arguments:
Returns: boolean
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.
|
code » | |||||||
Gets the goog.events.Listener for the event or null if no such listener is
in use.
Arguments:
Returns: goog.events.ListenableKey
the found listener or null if not found.
|
code » | |||||||
No description.
Arguments:
Returns: goog.events.ListenerMap
A listener map for the given
source object, or null if none exists.
|
code » | |||||||
Gets the listeners for a given object, type and capture phase.
Arguments:
Returns: Array.<goog.events.Listener>
Array of listener objects.
|
code » | |||||||
Returns a string with 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: !Function
A new or reused function object.
|
code » | |||||||
This returns estimated count, now that Closure no longer
stores a central listener registry. We still return an estimation
to keep existing listener-related tests passing. In the near future,
this function will be removed.
Gets the total number of listeners currently in the system.
Returns: number
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.
Arguments:
Returns: boolean
Result of the event handler.
|
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: boolean
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: boolean
True if the event object has been marked.
|
code » | |||||||
![]()
Adds an event listener for a specific event on a native event
target (such as a DOM element) or an object that has implemented
goog.events.Listenable . A listener can only be added once
to an object and if it is added again the key for the listener is
returned. Note that if the existing listener is a one-off listener
(registered via listenOnce), it will no longer be a one-off
listener after a call to listen().
Arguments:
Returns: goog.events.Key
Unique key for the listener.
|
code » | |||||||
![]()
Adds an event listener for a specific event on a native event
target (such as a DOM element) or an object that has implemented
goog.events.Listenable . After the event has fired the event
listener is removed from the target.
If an existing listener already exists, listenOnce will do
nothing. In particular, if the listener was previously registered
via listen(), listenOnce() will not turn the listener into a
one-off listener. Similarly, if there is already an existing
one-off listener, listenOnce does not modify the listeners (it is
still a once listener).
Arguments:
Returns: goog.events.Key
Unique key for the listener.
|
code » | |||||||
![]()
Adds an event listener with a specific event wrapper on a DOM Node or an
object that has implemented
goog.events.Listenable . A listener can
only be added once to an object.
Arguments:
|
code » | |||||||
![]()
Adds an event listener for a specific event on a native event
target. A listener can only be added once to an object and if it
is added again the key for the listener is returned.
Note that a one-off listener will not change an existing listener,
if any. On the other hand a normal listener will change existing
one-off listener to become a normal listener.
Arguments:
Returns: goog.events.ListenableKey
Unique key for the listener.
|
code » | |||||||
![]()
This is used to mark the IE event object so we do not do the Closure pass
twice for a bubbling event.
Arguments:
|
code » | |||||||
![]()
Installs exception protection for the browser event entry point using the
given error handler.
Arguments:
|
code » | |||||||
![]()
No description.
|
code » | |||||||
Removes all listeners from an object. You can also optionally
remove listeners of a particular type.
|
code » | |||||||
This doesn't do anything, now that Closure no longer
stores a central listener registry.
Removes all native listeners registered via goog.events. Native
listeners are listeners on native browser objects (such as DOM
elements). In particular, goog.events.Listenable and
goog.events.EventTarget listeners will NOT be removed.
Returns: number
Number of listeners removed.
|
code » | |||||||
Removes an event listener which was added with listen().
Arguments:
Returns: ?boolean
indicating whether the listener was there to remove.
|
code » | |||||||
Removes an event listener which was added with listen() by the key
returned by listen().
Arguments:
Returns: boolean
indicating whether the listener was there to remove.
|
code » | |||||||
![]()
Removes an event listener which was added with listenWithWrapper().
Arguments:
|
code » | |||||||
No description.
Arguments:
Returns: !Function
Either the original function or a function that
calls obj.handleEvent. If the same listener is passed to this
function more than once, the same function is guaranteed to be
returned.
|
code » |
![]()
No description.
|
Code » |