EventManager source
Properties
-
activeTarget source
-
The logical component that has focus within the application
This can be used as the proximal target for dispatching in situations where it logically makes sense that and event, while created by some other component, should appear to originate from where the user is currently focused.
This is particularly useful for things such as keyboard shortcuts or menuAction events.
Prior to setting the activeTarget manually the desired target should be checked to see if it
acceptsActiveTarget
. In the course of then setting that target as the activeTarget, the current activeTarget will be instructed tosurrendersActiveTarget
. If the activeTarget refuses to surrender, the change is rejected. -
application :string source
-
The application object associated with the event manager.
Default Value: - null
-
delegate :string source
-
Default Value: - null
-
isStoringMouseEventsWhileDraggingOnly :Function source
-
Default Value: - {boolean} true
-
isStoringPointerEvents :Function source
-
Default Value: - {boolean} false
-
registeredEventListeners :Listeners source
-
Registered event listeners.
Default Value: - {}
Methods
-
actualDOMTargetForEventTypeOnTarget(eventType, target) source
-
Determines the actual target to observe given a target and an eventType. This correctly decides whether to observe the element specified or to observe some other element to leverage event delegation. This should be consulted whenever starting or stopping the observation of a target for a given eventType.
Parameters:
Name Type Description eventType
Event target
Event Returns:
null || target.screen ? target.document : target.ownerDocument
-
claimPointer(pointer, component) source
-
Claims that a pointer, referred to by the specified pointer identifier, is claimed by the specified component. This does not give the component exclusive use of the pointer per se, but does indicate that the component is acting in a manner where it expects to be the only one performing major actions in response to this pointer. Other components should respect the claimant's desire to react to this pointer in order to prevent an entire hierarchy of components from reacting to a pointer in potentially conflicting ways.
If the pointer is currently claimed by another component that component is asked to surrender the pointer, which is may or may not agree to do.
Parameters:
Name Type Description pointer
string The pointer identifier to claim
component
string The component that is claiming the specified pointer.
Returns:
boolean Whether or not the pointer was successfully claimed.
-
componentClaimingPointer(pointer) source
-
The component claiming the specified pointer component
Parameters:
Name Type Description pointer
string The pointer identifier in question
Returns:
component
-
eventHandlerForElement(anElement) source
-
Parameters:
Name Type Description anElement
Element Returns:
this._elementEventHandlerByUUID[anElement.eventHandlerUUID]
-
forfeitAllPointers(component) source
-
Forfeits all pointers from the specified component.
Parameters:
Name Type Description component
Component -
forfeitPointer(pointer, component) source
-
Forfeits the specified pointer identifier from the specified component. The specified component must be the current claimant.
Parameters:
Name Type Description pointer
string The pointer identifier in question
component
string The component that is trying to forfeit the specified pointer
-
handleEvent(event) source
-
Parameters:
Name Type Description event
Event The handled event.
-
initWithWindow(aWindow) source
-
Parameters:
Name Type Description aWindow
Window Returns:
this.registerWindow(aWindow)
-
isPointerClaimedByComponent(pointer, component) source
-
Whether or not the specified pointer identifier is claimed by the specified component.
Parameters:
Name Type Description pointer
string The pointer identifier in question
component
string The component to interrogate regarding ownership of the specified pointer
Returns:
boolean
-
methodNameForBubblePhaseOfEventType() source
-
-
pointerMotion(identifier) source
-
Parameters:
Name Type Description identifier
attribute -
registeredEventListenersForEventType_(eventType) source
-
Returns a dictionary of all listeners registered for the specified eventType, regardless of the target being observed.
Parameters:
Name Type Description eventType
Event The event type.
Returns:
null || listeners
-
registeredEventListenersForEventType_onTarget_(eventType, target) source
-
Returns the dictionary of all listeners registered for the specified eventType, on the specified target.
Parameters:
Name Type Description eventType
Event The event type.
target
Event The event target.
Returns:
targetRegistration ? targetRegistration.listeners : null
-
registeredEventListenersOnTarget_(target) source
-
Returns the dictionary of all listeners registered on the specified target, keyed by eventType.
Parameters:
Name Type Description target
Event The event target.
Returns:
observedEventListeners
-
registerEventHandlerForElement(anElementEventHandler, anElement) source
-
Parameters:
Name Type Description anElementEventHandler
Event anElement
Element -
registerEventListener(target, eventType, listener, useCapture) source
-
This adds the listener to the definitive collection of what targets are being observed for what eventTypes by whom and in what phases. This collection maintained by the EventManager is used throughout the discovery and distribution steps of the event handling system.
Parameters:
Name Type Description target
Event The event target.
eventType
Event The event type.
listener
Event The event listener.
useCapture
Event The event capture.
Returns:
returnResult
-
registerWindow(aWindow) source
-
Parameters:
Name Type Description aWindow
Window -
reset() source
-
-
unload() source
-
-
unregisterEventHandlerForElement(anElement) source
-
Parameters:
Name Type Description anElement
Element -
unregisterEventListener(target, eventType, listener, useCapture) source
-
This unregisters the listener.
Parameters:
Name Type Description target
Event The event target.
eventType
Event The event type.
listener
Event The event listener.
useCapture
Event The event capture.
-
unregisterWindow(aWindow) source
-
Parameters:
Name Type Description aWindow
Window -
unregisterWindows() source
-
Generated from v0.14.14