cpr.events.CEvent

Event class. The superclass of another event class.

Index

Properties
Name Type Description
AT_TARGET Number eventPhase constant.
BUBBLING_PHASE Number eventPhase constant.
CAPTURING_PHASE Number eventPhase constant.
NONE Number Commits on Mar 29, 2018
bubbles Boolean Indicates whether the specified event is bubbled through the DOM.
cancelBubble Boolean The logging alias for the stopPropagation () method.
cancelable Boolean Indicates whether the event is cancelable.
clipboardData DataTransfer It is a properties provided in Poste, Copy, Cut.
composed Boolean Indicates whether the event propagated across the Shadow DOM area and the standard DOM area.
control IEventTarget Returns the control that dispatched the current event.
currentTarget EventTarget Identifies the current target of the event as it passes through the DOM.
defaultPrevented Boolean Returns a Boolean indicating if the preventDefault () method has been called on the event.
eventPhase Number Indicates the stage of the event flow currently being evaluated.
immediatePropagationStopped Boolean Obtains whether other listeners have been blocked from being called on the same event.
isTrusted Boolean A value that is true if it was generated by a user action, false if the script is written or modified, or passed through dispatchEvent.
isWrapper Boolean Returns whether this is a wrapper.
option CEventOption Returns the side information of the CEvent object.
propagationStopped Boolean Obtains whether the event has been blocked from propagating.
relatedTargetObject Object The child control on which the event is fired returns its associated side information within the parent control to which it belongs.
returnValue Boolean Indicates whether the default behavior of the event has been prevented.
scoped Boolean A Boolean value that indicates whether an event can bubble at the border between the Shadow DOM and the normal DOM.
srcElement EventTarget Exclusive alias for the standard Event.target property.
target EventTarget A reference to the object that dispatched the event.
targetControl IEventTarget Returns the control that raised the first event.
targetObject Object Returns the associated object of the control where the first event occurred.
timeStamp Number Returns the time at which the event occurred based on ms (milliseconds).
type String Returns a string that contains the event type.
userData object Specifies or gets a custom data object.
Methods
Name Return Type Description
composedPath EventTarget[] Returns the path in an array of Listener objects on which to fire the event.
deepPath EventTarget[] The deepPath property of the Event interface returns an array of nodes with inflated events.
initEvent Initializes an event object created with the createEvent method of type 'Event'.
preventDefault Prevents the following default behavior:
setCurrentTarget Sets the event target element.
stopImmediatePropagation Prevents other listeners for the same event from being called.
stopPropagation Prevents further propagation of current events during the capture and bubbling phases.

Constructor

CEvent(type, options)
Creates an event object.
Parameters
name type description
type String Type of event, e.g. "Click".
optionsoptional CEventOption

Properties

AT_TARGET
type Number
readonly
eventPhase constant. At this stage, a registered event listener is called at this time.
BUBBLING_PHASE
type Number
readonly
eventPhase constant. This event propagates the ancestors of the target in reverse order, in reverse order, starting from the parent and eventually reaching the contained Window.
CAPTURING_PHASE
type Number
readonly
eventPhase constant. The event is propagated through the ancestor objects of the target. This process begins with a window, a document, an HTMLHtmlElement, and so on until it reaches the parent of the object.
NONE
type Number
readonly
Commits on Mar 29, 2018
bubbles
type Boolean
readonly
Indicates whether the specified event is bubbled through the DOM.
cancelBubble
type Boolean
get
The logging alias for the stopPropagation () method.
set
The logging alias for the stopPropagation () method.
cancelable
type Boolean
readonly
Indicates whether the event is cancelable.
clipboardData
type DataTransfer
readonly
It is a properties provided in Poste, Copy, Cut. Other events return null.
composed
type Boolean
readonly
Indicates whether the event propagated across the Shadow DOM area and the standard DOM area.
control
type IEventTarget
readonly
Returns the control that dispatched the current event.
currentTarget
type EventTarget
readonly
Identifies the current target of the event as it passes through the DOM.
defaultPrevented
type Boolean
readonly
Returns a Boolean indicating if the preventDefault () method has been called on the event.
eventPhase
type Number
readonly
Indicates the stage of the event flow currently being evaluated.
immediatePropagationStopped
type Boolean
readonly
Obtains whether other listeners have been blocked from being called on the same event.
isTrusted
type Boolean
readonly
A value that is true if it was generated by a user action, false if the script is written or modified, or passed through dispatchEvent.
isWrapper
type Boolean
readonly
Returns whether this is a wrapper.
option
type CEventOption
readonly
Returns the side information of the CEvent object.
propagationStopped
type Boolean
readonly
Obtains whether the event has been blocked from propagating.
relatedTargetObject
type Object
readonly
The child control on which the event is fired returns its associated side information within the parent control to which it belongs.
returnValue
type Boolean
get
Indicates whether the default behavior of the event has been prevented.
set
Sets whether the default behavior of the event is prevented.
By default, this is set to true to allow default behavior.
If this property is set to false, the default action is prohibited.
scoped
type Boolean
readonly
A Boolean value that indicates whether an event can bubble at the border between the Shadow DOM and the normal DOM.
srcElement
type EventTarget
readonly
Exclusive alias for the standard Event.target property.
Applies only to earlier versions of Microsoft Internet Explorer.
target
type EventTarget
readonly
A reference to the object that dispatched the event.
It differs from event.currentTarget when an event handler is called in the bubbling or capture phase of an event.
targetControl
type IEventTarget
readonly
Returns the control that raised the first event.
targetObject
type Object
readonly
Returns the associated object of the control where the first event occurred. If a control has a child object, such as a Grid, the child object's information will be returned when the event occurs on the child object. The returned object may or may not be present, depending on the event firing control.
timeStamp
type Number
readonly
Returns the time at which the event occurred based on ms (milliseconds).
type
type String
readonly
Returns a string that contains the event type.
It is set when an event is generated and is a commonly used name to refer to a specific event.
userData
type object
Specifies or gets a custom data object.

Methods

composedPath()
Returns the path in an array of Listener objects on which to fire the event.
return EventTarget[]
deepPath()
The deepPath property of the Event interface returns an array of nodes with inflated events.
return EventTarget[] An array of nodes.
initEvent(eventTypeArg, canBubbleArg, cancelableArg)
Initializes an event object created with the createEvent method of type 'Event'.
Parameters
name type description
eventTypeArg String A string that specifies the name (type) of the event to initialize.
canBubbleArg Boolean Specifies whether the event is bubbled. Sets the bubbles property of the event object.
cancelableArg Boolean Specifies whether the event can be canceled. Sets the cancelable property of the event object.
preventDefault()
Prevents the following default behavior:
setCurrentTarget(eventTarget)
Sets the event target element.
Parameters
name type description
eventTarget EventTarget
stopImmediatePropagation()
Prevents other listeners for the same event from being called.
stopPropagation(nativeCall)
Prevents further propagation of current events during the capture and bubbling phases.
Parameters
name type description
nativeCalloptional Boolean defaulttrue