W3C Event Reference. Part of the Events Interface.
The following notes apply:
The following properties (attributes) are exposed when an event is triggered (an event object is created). ALL properties (attributes) below are READ ONLY.
Property | Description |
altKey | boolean - true if alt key pressed |
button | 0 = right, 1 = middle, 2 = left. More than one button may be indicated. In Gecko not valid on mousemove, mouseout, mouseover. |
clientX | the horizontal offset in pixels from the parent node of this object. |
clientY | the vertical offset in pixels from the parent node of this object. |
ctrlKey | boolean - true = control key pressed. |
metaKey | boolean true = meta key pressed. |
relatedTarget | on 'mouseover' should be object being exited. For 'mouseout' should be the object being entered. |
screenX | the horizontal offset in pixels from the origin of the screen. |
screenY | the vertical offset in pixels from the origin of the screen. |
shiftKey | boolean true = shift key was pressed. |
bubbles | boolean true = event can bubble. |
cancelable | boolean true = event can be canceled. |
currentTarget | the name of the object currently being processed. |
eventPhase | may be: AT_TARGET - evaluation (being initialised) BUBBLING_PHASE CAPTURING_PHASE. |
target | indicates the target to which the event was originally dispatched. |
timeStamp | time in milliseconds from 1st January 1970 (UCT) or 0 if not available. |
type | the name of the event. |
detail | event specific details. |
view | identifies the AbstractView for the event (?). |
attrChange | Mutation. Indicates the type of change may be: ADDITION, MODIFICATION, REMOVAL. |
attrName | Mutation. The name of object that changed. |
newValue | Mutation. The new value of the object. |
prevValue | Mutation. The previous value of the object. |
relatedNode | Mutation. Indicates the actual node changed if an indirect event was created (the event was triggered by a change to another node which may be higher or lower in the hierarchy). |
The following methods are exposed when an event is triggered (an event object is created).
Method | Description |
addEventListener | adds an event listener for the defined event type for the specified object. |
dispatchevent | fires an event created by a createEvent followed by an initEvent. |
removeEventListener | removes an event listener for the defined event type for the specified object. |
initEvent | initialises an event that is subsequently fired by the dispatchEvent method. |
preventDefault | stops the event bubbling (this lets you stop the default context menu on right mouse click). |
stopPropagation | stops further event triggering at higher levels in the object hierarchy (this lets you stop the default context menu on right mouse click). |
createEvent | called as part of a sequence to fire an event createEvent->initMouseEvent->dispatchevent. |
initUIEvent | initialises a UI event that is subsequently fired by the dispatchEvent method. |
initMouseEvent | initialises a Mouse event that is subsequently fired by the dispatchEvent method. |
initMutationEvent | initialises a Mutation event that is subsequently fired by the dispatchEvent method. |
Problems, comments, suggestions, corrections (including broken links) or something to add? Please take the time from a busy life to 'mail us' (at top of screen), the webmaster (below) or info-support at zytrax. You will have a warm inner glow for the rest of the day.
Tech Stuff
If you are happy it's OK - but your browser is giving a less than optimal experience on our site. You could, at no charge, upgrade to a W3C standards compliant browser such as Firefox
Search
Share
Page
Resources
HTML Stuff
W3C HTML 4.01
HTML5 (WHATWG)
HTML4 vs HTML5
HTML5 Reference
W3C Page Validator
W3C DOCTYPE
CSS Stuff
W3C CSS2.1
W3C CSS2.2
Default Styles
CSS3 Selectors
CSS 3 Media Queries
CSS 3 Colors
DOM Stuff
W3C DOM
W3C DOM 3 Core
W3C 3 Events
Accessibility
usability.gov
W3C - WAI
Web Style Guide
WebAim.org
Useful Stuff
Peter-Paul Koch
A List Apart
Eric Meyer on CSS
glish.com
Our Stuff
Our DOM Pages
DOM Navigation
Liquid Layout
CSS Short Cuts
CSS overview
CSS One Page
Javascript Stuff
Site
Copyright © 1994 - 2024 ZyTrax, Inc. All rights reserved. Legal and Privacy |
site by zytrax hosted by javapipe.com |
web-master at zytrax Page modified: January 20 2022. |