You are here: Reference > JavaScript > client-side > event handling > properties

Event properties

Key related properties:
Property Support Description
altKey
(event)
Sets or retrieves a Boolean value that indicates whether the left or right ALT key was down at the time when the event occurred.
altLeft
(event)
Sets or retrieves a Boolean value that indicates whether the left ALT key was down at the time when the event occurred.
charCode
(event)
9
Retrieves the Unicode character code of the key that generated the onkeypress event.
ctrlKey
(event)
Sets or retrieves whether the left or right CTRL key was down at the time when the event occurred.
ctrlLeft
(event)
Sets or retrieves whether the left CTRL key was down at the time when the event occurred.
data
(event)
839.5
Returns the characters entered in case of the textInput event or the contents of the message for the onmessage event.
isChar
(event)
Returns whether the character that belongs to the current event is a key character or not.
keyCode
(event)
Sets or retrieves the Unicode character code of the key that generated the onkeypress event and the Unicode key code of the key that generated the onkeydown and onkeyup events.
metaKey
(event)
9
Retrieves a Boolean value that indicates whether the META key was down at the time when the event occurred.
shiftKey
(event)
Sets or retrieves a Boolean value that indicates whether the left or right SHIFT key was down at the time when the event occurred.
shiftLeft
(event)
Sets or retrieves a Boolean value that indicates whether the left SHIFT key was down at the time when the event occurred.
which
(event)
9
Returns the Unicode character or key code of the key or the identifier of the mouse button that was pressed when the current event fired.
Mouse related properties:
Property Support Description
button
(event)
Sets or retrieves the mouse button(s) that were pressed at the time when the current event was fired.
clientX
(event)
Sets or returns the x-coordinate of the mouse pointer relative to the top-left corner of the browser window's client area.
clientY
(event)
Sets or returns the y-coordinate of the mouse pointer relative to the top-left corner of the browser window's client area.
detail
(event)
9
Returns an integer value that specifies additional information about the event.
layerX
(event)
9
Retrieves the x-coordinate of the mouse pointer relative to the top-left corner of the closest positioned ancestor element of the element that fires the event.
layerY
(event)
9
Retrieves the y-coordinate of the mouse pointer relative to the top-left corner of the closest positioned ancestor element of the element that fires the event.
offsetX
(event)
Sets or retrieves the x-coordinate of the mouse pointer relative to the top-left corner of the offsetParent element of the element that fires the event.
offsetY
(event)
Sets or retrieves the y-coordinate of the mouse pointer relative to the top-left corner of the offsetParent element of the element that fires the event.
pageX
(event)
9
Retrieves the x-coordinate of the mouse pointer relative to the top-left corner of the document.
pageY
(event)
9
Retrieves the y-coordinate of the mouse pointer relative to the top-left corner of the document.
screenX
(event)
Sets or retrieves the x-coordinate of the mouse pointer relative to the top-left corner of the screen.
screenY
(event)
Sets or retrieves the y-coordinate of the mouse pointer relative to the top-left corner of the screen.
wheelDelta
(event)
Returns an integer value indicating the distance that the mouse wheel rolled.
x
(event)
Sets or retrieves the x-coordinate of the mouse pointer relative to the top-left corner of the closest relatively positioned ancestor element of the element that fires the event.
y
(event)
Sets or retrieves the y-coordinate of the mouse pointer relative to the top-left corner of the closest relatively positioned ancestor element of the element that fires the event.
Element related properties:
Property Support Description
currentTarget
(event)
9
Returns a reference to the element whose event listener is being processed.
explicitOriginalTarget
(event)
Returns a reference to the exact object on which the event originally occurred.
fromElement
(event)
Returns a reference to the object that lost the active state or that the mouse pointer left.
originalTarget
(event)
Returns a reference to the object on which the event originally occurred.
relatedNode
(event)
9
Returns a reference to the node on which the mutation event occurred.
relatedTarget
(event)
9
Returns a reference to the related element in case of onmouseover, onmouseout, dragenter and dragexit events.
srcElement
(event)
Retrieves a reference to the object on which the event occurred.
target
(event)
9
Returns a reference to the object on which the event originally occurred.
toElement
(event)
Returns a reference to the object that the mouse pointer entered.
view
(event)
9
Returns a reference to the AbstractView object where the event occurred.
Attribute related properties:
Property Support Description
attrChange
(event)
9
Returns an integer that specifies the type of the action that modified an attribute.
attrName
(event)
9
Retrieves a string that specifies the name of the modified attribute.
newValue
(event)
9
Retrieves a string that specifies the current value of the modified attribute or TextNode element.
prevValue
(event)
9
Retrieves a string that specifies the previous value of the modified attribute or TextNode element.
propertyName
(event)
Specifies or retrieves a string that contains the name of the property that is changed.
Event information properties:
Property Support Description
bubbles
(event)
9
Returns a Boolean value that indicates whether the current event can propagate up the DOM hierarchy or not.
cancelable
(event)
9
Returns a Boolean value that indicates whether the current event can be canceled or not.
cancelBubble
(event)
9
Sets or retrieves a Boolean value that indicates whether the current event should propagate up the DOM hierarchy, or not.
eventPhase
(event)
9
Returns an integer value that indicates the current processing phase of an event.
isTrusted
(event)
9
Returns a Boolean value that indicates whether the event is a trusted event or not.
repeat
(event)
Sets or retrieves a Boolean value that indicates whether the onkeydown event is being repeated (a key has been down long enough).
returnValue
(event)
Sets or retrieves a Boolean value that indicates whether the current event is canceled.
timeStamp
(event)
9
Returns the time in milliseconds when the current event occurred.
type
(event)
Retrieves a string that represents the type of the event, such as "mouseout", "click", etc.
Drag and drop properties:
Property Support Description
dataTransfer
(event)
3.5
Represents a drag-and-drop operation.
dropEffect
(dataTransfer)
3.5
Specifies or retrieves the type of the drag-and-drop operation.
effectAllowed
(dataTransfer)
3.5
Specifies or retrieves the allowed types of the current drag-and-drop operation.
files
(dataTransfer)
3.65
Returns a FileList collection that represents the dropped files during the current drag-and-drop operation.
mozItemCount
(dataTransfer)
3.5
Returns the number of dragged items during the current drag-and-drop operation.
mozUserCancelled
(dataTransfer)
3.5
Returns whether the current drag-and-drop operation has been canceled by the user.
types
(dataTransfer)
3.55
Returns a DOMStringList collection that contains the available data formats for the first item of the current drag-and-drop operation.
Data binding properties:
Property Support Description
bookmarks
(event)
Represents a collection of ADO bookmarks associated with the rows affected by the current event.
boundElements
(event)
Represents a collection of elements bound to the data set on which the current event occurred.
dataFld
(event)
Sets or returns the name of the modified data column in case of the oncellchange event.
Cross-document message properties:
Property Support Description
data
(event)
839.5
Returns the characters entered in case of the textInput event or the contents of the message for the onmessage event.
domain
(event)
9.5
10
Returns the hostname of the server that served the document that caused the onmessage event.
lastEventId
(event)
310.6
Returns the identifier of the last event in case of onmessage events.
origin
(event)
8310
Returns the scheme, hostname and port of the document that caused the onmessage event.
source
(event)
839.5
Returns a reference to the window object that contains the document that caused the onmessage event.
uri
(event)
9.5
10
Returns the location of the document that caused the onmessage event.
Additional properties:
Property Support Description
event
(script)
Sets or retrieves an event that the script element should listen for.
event
(window)
Represents an object that contains information about an event that has occurred.
horizontalOverflow
(event)
Retrieves a Boolean value that indicates the horizontal overflow state of an element when the overflowchanged event occurred.
orient
(event)
Retrieves whether the visibility of the horizontal or vertical scrollbar changed when the overflowchanged event occurred.
qualifier
(event)
Sets or retrieves the name of the default data member. Use this property with data binding events (such as ondatasetcomplete).
rangeOffset
(event)
Returns the end position of the current selection relative to the element referred to by the rangeParent.
rangeParent
(event)
Returns a reference to the element where the selection ends.
reason
(event)
Sets or retrieves an integer value that indicates whether the data transfer was successful or not. Use this property with ondatasetcomplete events.
srcFilter
(event)
Specifies or retrieves a reference to the filter object that generated the onfilterchange event.
srcUrn
(event)
Sets or retrieves the Uniform Resource Identifier (URI) of the behavior that fired the event.
verticalOverflow
(event)
Retrieves a Boolean value that indicates the vertical overflow state of an element when the overflowchanged event occurred.
User Contributed Comments

Post Content

Post Content