Netscape provides some static properties of the Event object class that define mask values for event types. These can then be combined with a bitwise OR operator to build a mask that can be applied with the captureEvents() and releaseEvents() methods that are supported by Window, Document and Layer objects.
Here is a list of the available event type constants:
Bit | Constant | Event type |
---|---|---|
2^0 | MOUSEDOWN | The mouse button was pressed while the pointer was over the element. |
2^1 | MOUSEUP | The mouse button was released while the pointer was within the extent region of the element. |
2^2 | MOUSEOVER | The mouse has just moved over the extent region of the element. |
2^3 | MOUSEOUT | The mouse has just moved out of the extent region of the element. |
2^4 | MOUSEMOVE | The mouse was moved within the extent region of the element. |
2^5 | undefined | Reserved for future use. |
2^6 | CLICK | The element has been clicked on. |
2^7 | DBLCLICK | The element has been double-clicked on. |
2^8 | KEYDOWN | A key was pressed while the element had focus. |
2^9 | KEYUP | A key was released while the element had focus. |
2^10 | KEYPRESS | A key was pressed and released again while the element had focus. |
2^11 | DRAGDROP | Some entity has been dragged over and dropped onto the element. |
2^12 | FOCUS | The element has had input focus restored to it. |
2^13 | BLUR | Window or input element has lost input focus. |
2^14 | SELECT | An item in a pop-up menu was selected. |
2^15 | CHANGE | The input element's value has changed. |
2^16 | RESET | The [RESET] button within a <FORM> was clicked. |
2^17 | SUBMIT | The [SUBMIT] button within a <FORM> was clicked. |
2^18 | undefined | Reserved for future use. |
2^19 | LOAD | An element (usually a <BODY> or <IMG>) has completed loading. |
2^20 | UNLOAD | The element (usually a <BODY>) is about to be unloaded. |
2^21 | undefined | Reserved for future use. |
2^22 | ABORT | Image loading was aborted. |
2^23 | ERROR | A script error has occurred. |
2^24 | undefined | Reserved for future use. |
2^25 | MOVE | The element (usually a Window) was moved. |
2^26 | RESIZE | The element (usually a Window) was resized. |
2^27 | undefined | Reserved for future use. |
2^28 | undefined | Reserved for future use. |
2^29 | undefined | Reserved for future use. |
2^30 | undefined | Reserved for future use. |
2^31 | undefined | Reserved for future use. |
Prev | Home | Next |
Event propagation | Up | EventCapturer object |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |