Search completed in 1.18 seconds.
96 results for "mouseevent":
Your results are loading. Please wait...
MouseEvent.initMouseEvent() - Web APIs
The MouseEvent.initMouseEvent() method initializes the value of a mouse event once it's been created (normally using the Document.createEvent() method). Events initialized in this way must have been created with the Document.createEvent() method. This method must be called to set the event before it is dispatched, using EventTarget.dispatchEvent(). Once dispatched, it doesn't do anything anymore. Do not use this method anymore as it is deprecated. Instead use specific event constructors, like MouseEvent(). The page on Creating and triggering events gives more information about the way to use these. ...
...teEvent() method. This method must be called to set the event before it is dispatched, using EventTarget.dispatchEvent(). Once dispatched, it doesn't do anything anymore. Do not use this method anymore as it is deprecated. Instead use specific event constructors, like MouseEvent(). The page on Creating and triggering events gives more information about the way to use these. Syntax event.initMouseEvent(type, canBubble, cancelable, view, detail, screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey, metaKey, button, relatedTarget); Parameters type the string to set the event's type to. Possible types for mouse events include: click, mousedown, mouseup, mouseover, mousemove, mouseout. canBubble whether or not the event ...
...event can bubble. Sets the value of Event.bubbles. cancelable whether or not the event's default action can be prevented. Sets the value of Event.cancelable. view the event's AbstractView. You should pass the window object here. Sets the value of UIEvent.view. detail the event's mouse click count. Sets the value of UIEvent.detail. screenX the event's screen x coordinate. Sets the value of MouseEvent.screenX. screenY the event's screen y coordinate. Sets the value of MouseEvent.screenY. clientX the event's client x coordinate. Sets the value of MouseEvent.clientX. clientY the event's client y coordinate. Sets the value of MouseEvent.clientY. ctrlKey whether or not control key was depressed during the Event. Sets the value of MouseEvent.ctrlKey. altKey whether or not alt key was depr...
...And 5 more matches
MouseEvent - Web APIs
The MouseEvent interface represents events that occur due to the user interacting with a pointing device (such as a mouse). Common events using this interface include click, dblclick, mouseup, mousedown. MouseEvent derives from UIEvent, which in turn derives from Event. Though the MouseEvent.initMouseEvent() method is kept for backward compatibility, creating of a MouseEvent object should be done using the MouseEvent() constructor. Several more specific events are based on MouseEvent, including WheelEvent and DragEvent. <div id="interfaceDiagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveAs...
...ht="50" fill="#fff" stroke="#D4DDE4" stroke-width="2px" /><text x="153.5" y="30" font-size="12px" font-family="Consolas,Monaco,Andale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">UIEvent</text></a><polyline points="191,25 201,20 201,30 191,25" stroke="#D4DDE4" fill="none"/><line x1="201" y1="25" x2="231" y2="25" stroke="#D4DDE4"/><a xlink:href="/docs/Web/API/MouseEvent" target="_top"><rect x="231" y="1" width="100" height="50" fill="#F4F7F8" stroke="#D4DDE4" stroke-width="2px" /><text x="281" y="30" font-size="12px" font-family="Consolas,Monaco,Andale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">MouseEvent</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Constructor MouseEvent() Creates...
...arget="_top"><rect x="231" y="1" width="100" height="50" fill="#F4F7F8" stroke="#D4DDE4" stroke-width="2px" /><text x="281" y="30" font-size="12px" font-family="Consolas,Monaco,Andale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">MouseEvent</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Constructor MouseEvent() Creates a MouseEvent object. Properties This interface also inherits properties of its parents, UIEvent and Event. ...
...And 21 more matches
MouseEvent() - Web APIs
"screenY", optional and defaulting to 0, of type long, that is the vertical position of the mouse event on the user's screen; setting this value doesn't move the mouse pointer. ...
... "screenY", optional and defaulting to 0, of type long, that is the vertical position of the mouse event on the user's screen; setting this value doesn't move the mouse pointer. ...
... "screenY", optional and defaulting to 0, of type long, that is the vertical position of the mouse event on the user's screen; setting this value doesn't move the mouse pointer. ...
...And 2 more matches
HTMLIFrameElement.sendMouseEvent()
Non-standard This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future. The sendMouseEvent() method of the HTMLIFrameElement interface allows you to fake a mouse event and send it to the browser <iframe>'s content. Syntax instanceOfHTMLIframeElement.sendMouseEvent(type, x, y, button, clickCount, modifiers); Returns Void. Parameters type A string representing the event type. Possible values are mousedown, mouseup, mousemove, mouseover, mouseout, or contextmenu. x A number representing the x position of the cursor relative to ...
... ...
... ...
... ...
MouseEvent.altKey - Web APIs
Web › API › MouseEvent › altKey
Example This example logs the altKey property when you trigger a click event. ...
... indicates whether the alt key was pressed or not when a given mouse event occurs. Be aware that the browser can't always detect the alt key on some operating systems. On some Linux variants, for example, a left mouse click combined with the alt key is used to move or resize windows. Note: On Macintosh keyboards, this key is also known as the option key. Syntax var altKeyPressed = instanceOfMouseEvent.altKey Return value A Boolean, where true indicates that the key is pressed, and false indicates that the key is not pressed. Example This example logs the altKey property when you trigger a click event. HTML <p>Click anywhere to test the <code>altKey</code> property.</p> <p id="log"></p> JavaScript let log = document.querySelector('#log'); document.addEventListener('click', logKey); fu...
... Obsolete Initial definition. ...
...ey is pressed: ${e.altKey}`; } Result Specifications Specification Status Comment Document Object Model (DOM) Level 3 Events SpecificationThe definition of 'MouseEvent.altkey' in that specification. Obsolete No change from Document Object Model (DOM) Level 2 Events Specification. Document Object Model (DOM) Level 2 Events SpecificationThe definition of 'MouseEvent.altkey' in that specification. Obsolete Initial definition. ...
MouseEvent.button - Web APIs
Web › API › MouseEvent › button
The MouseEvent.button read-only property indicates which button was pressed on the mouse to trigger the event. This property only guarantees to indicate which buttons are pressed during events caused by pressing or releasing one or multiple buttons. As such, it is not reliable for events such as mouseenter, mouseleave, mouseover, mouseout or mousemove. Users may change the configuration of buttons on their pointing device so that if an event's button property is zero, it may not have been caused by the button that is physically left-most on the pointing device; however, it should behave as if the left button was clicked in the standard button layout. Note: Do not confuse this property with the MouseEvent.buttons property, which indicates which buttons are pressed for all mouse events types. S...
...t's button property is zero, it may not have been caused by the button that is physically left-most on the pointing device; however, it should behave as if the left button was clicked in the standard button layout. Note: Do not confuse this property with the MouseEvent.buttons property, which indicates which buttons are pressed for all mouse events types. ...
... Obsolete Initial definition. ...
... Result Specifications Specification Status Comment Document Object Model (DOM) Level 3 Events SpecificationThe definition of 'MouseEvent.button' in that specification. Obsolete Compared to Document Object Model (DOM) Level 2 Events Specification, the return value can be negative. Document Object Model (DOM) Level 2 Events SpecificationThe definition of 'MouseEvent.button' in that specification. Obsolete Initial definition. ...
MouseEvent.ctrlKey - Web APIs
Example This example logs the ctrlKey property when you trigger a click event. ...
... Example This example logs the ctrlKey property when you trigger a click event. ...
... Obsolete Initial definition. ...
... is pressed: ${e.ctrlKey}`; } Result Specifications Specification Status Comment Document Object Model (DOM) Level 3 Events SpecificationThe definition of 'MouseEvent.ctrlKey' in that specification. Obsolete No change from Document Object Model (DOM) Level 2 Events Specification. Document Object Model (DOM) Level 2 Events SpecificationThe definition of 'MouseEvent.ctrlKey' in that specification. Obsolete Initial definition. ...
MouseEvent.metaKey - Web APIs
Example This example logs the metaKey property when you trigger a click event. ...
... a given mouse event occurs. Be aware that many operating systems bind special functionality to the meta key, so this property may be false even when the key is actually pressed. On Windows, for example, this key may open the Start menu. Note: On Macintosh keyboards, this key is the command key (?). On Windows keyboards, this key is the Windows key (?). Syntax var metaKeyPressed = instanceOfMouseEvent.metaKey Return value A Boolean, where true indicates that the key is pressed, and false indicates that the key is not pressed. Example This example logs the metaKey property when you trigger a click event. HTML <p>Click anywhere to test the <code>metaKey</code> property.</p> <p id="log"></p> JavaScript let log = document.querySelector('#log'); document.addEventListener('click', logKey); ...
... Obsolete Initial definition. ...
... is pressed: ${e.metaKey}`; } Result Specifications Specification Status Comment Document Object Model (DOM) Level 3 Events SpecificationThe definition of 'MouseEvent.metaKey' in that specification. Obsolete No change from Document Object Model (DOM) Level 2 Events Specification. Document Object Model (DOM) Level 2 Events SpecificationThe definition of 'MouseEvent.metaKey' in that specification. Obsolete Initial definition. ...
MouseEvent.relatedTarget - Web APIs
The MouseEvent.relatedTarget read-only property is the secondary target for the mouse event, if there is one. That is: Event name target relatedTarget mouseenter The EventTarget the pointing device entered to The EventTarget the pointing device exited from mouseleave The EventTarget the pointing device exited from The EventTarget the pointing device entered to mouseout The EventTarget the pointing device exited from The EventTarget the pointing device entered to mouseover The EventTarget the pointing device entered to The EventTarget the pointing device exited from dragenter The EventTarget the pointing device entered to The EventTarget the pointing device exited from dragexit The EventTarget the ...
...dragenter The EventTarget the pointing device entered to The EventTarget the pointing device exited from dragexit The EventTarget the pointing device exited from The EventTarget the pointing device entered to For events with no secondary target, relatedTarget returns null. FocusEvent.relatedTarget is a similar property for focus events. Syntax var target = instanceOfMouseEvent.relatedTarget Return value An EventTarget object or null. Example Try moving your mouse cursor into and out of the red and blue boxes. HTML <body id="body"> <div id="outer"> <div id="red"></div> <div id="blue"></div> </div> <p id="log"></p> </body> CSS #outer { width: 250px; height: 125px; display: flex; } #red { flex-grow: 1; background: red; } #blue { flex-g...
...useoutLog.innerText = `\nfrom ${event.target.id} into ${related} ${mouseoutLog.innerText}`; } function overListener(event) { let related = event.relatedTarget ? ...
...dTarget ? event.relatedTarget.id : "unknown"; log.innerText = `\ninto ${event.target.id} from ${related} ${mouseoutLog.innerText}`; } Result Specifications Specification Status Comment UI EventsThe definition of 'MouseEvent.relatedTarget' in that specification. Working Draft Document Object Model (DOM) Level 3 Events SpecificationThe definition of 'MouseEvent.relatedTarget' in that specification. Obsolete No change from Document Object Model (DOM) Level 2 Events Specification. Document Object Model (DOM) Level 2 Events SpecificationThe definition of 'MouseEvent.altkey' in that specification. Obsolete Initial definition. ...
MouseEvent.shiftKey - Web APIs
Example This example logs the shiftKey property when you trigger a click event. ...
... Example This example logs the shiftKey property when you trigger a click event. ...
... Obsolete Initial definition. ...
...s pressed: ${e.shiftKey}`; } Result Specifications Specification Status Comment Document Object Model (DOM) Level 3 Events SpecificationThe definition of 'MouseEvent.shiftKey' in that specification. Obsolete No change from Document Object Model (DOM) Level 2 Events Specification. Document Object Model (DOM) Level 2 Events SpecificationThe definition of 'MouseEvent.shiftKey' in that specification. Obsolete Initial definition. ...
MouseEvent.which - Web APIs
Web › API › MouseEvent › which
In this case, the values are read from right to left. ...
...In this case, the values are read from right to left. ...
...In this case, the values are read from right to left. ...
...In this case, the values are read from right to left. ...
MouseEvent.buttons - Web APIs
The MouseEvent.buttons read-only property indicates which buttons are pressed on the mouse (or other input device) when a mouse event is triggered. Each button that can be pressed is represented by a given number (see below). If more than one button is pressed, the button values are added together to produce a new number. For example, if the secondary (2) and auxilary (4) buttons are pressed simultaneously, the value is 6 (i.e., 2 + 4). Note: Do not confuse this property with the MouseEvent.button property. The MouseEvent.buttons property indicates the state of buttons pressed during any kind of mouse event, while the MouseEvent.button property only guarantees the correct value for mouse events caused by pressing or releasing one or multiple buttons. Syntax var buttonsPressed = instanceOfMous...
... Working Draft Current working draft ...
... Working Draft Current working draft ...
MouseEvent.clientX - Web APIs
Originally, this property was defined as a long integer. See the "Browser compatibility" section for details. Example This example displays your mouse's coordinates whenever you trigger the mousemove event. ...
...Originally, this property was defined as a long integer. See the "Browser compatibility" section for details. Example This example displays your mouse's coordinates whenever you trigger the mousemove event. ...
...('#screen-log'); document.addEventListener('mousemove', logKey); function logKey(e) { screenLog.innerText = ` Screen X/Y: ${e.screenX}, ${e.screenY} Client X/Y: ${e.clientX}, ${e.clientY}`; } Result Specifications Specification Status Comment CSS Object Model (CSSOM) View ModuleThe definition of 'clientX' in that specification. Working Draft Redefines MouseEvent from long to double. Document Object Model (DOM) Level 3 Events SpecificationThe definition of 'MouseEvent.clientX' in that specification. Obsolete No change from Document Object Model (DOM) Level 2 Events Specification. Document Object Model (DOM) Level 2 Events SpecificationThe definition of 'MouseEvent.clientX' in that specification. Obsolete Initial definition. ...
MouseEvent.clientY - Web APIs
Originally, this property was defined as a long integer. See the "Browser compatibility" section for details. Example This example displays your mouse's coordinates whenever you trigger the mousemove event. ...
...Originally, this property was defined as a long integer. See the "Browser compatibility" section for details. Example This example displays your mouse's coordinates whenever you trigger the mousemove event. ...
...('#screen-log'); document.addEventListener('mousemove', logKey); function logKey(e) { screenLog.innerText = ` Screen X/Y: ${e.screenX}, ${e.screenY} Client X/Y: ${e.clientX}, ${e.clientY}`; } Result Specifications Specification Status Comment CSS Object Model (CSSOM) View ModuleThe definition of 'clientY' in that specification. Working Draft Redefines MouseEvent from long to double. Document Object Model (DOM) Level 3 Events SpecificationThe definition of 'MouseEvent.clientY' in that specification. Obsolete No change from Document Object Model (DOM) Level 2 Events Specification. Document Object Model (DOM) Level 2 Events SpecificationThe definition of 'MouseEvent.clientY' in that specification. Obsolete Initial definition. ...
MouseEvent.y - Web APIs
Web › API › MouseEvent › y
Working Draft Initial definition. ...
... Working Draft Initial definition. ...
... Working Draft Initial definition. ...
MouseEvent.movementX - Web APIs
The movementX read-only property of the MouseEvent interface provides the difference in the X coordinate of the mouse pointer between the given event and the previous mousemove event. In other words, the value of the property is computed like this: currentEvent.movementX = currentEvent.screenX - previousEvent.screenX. Syntax var xShift = instanceOfMouseEvent.movementX; Return value A number Example This example logs the amount of mouse movement using movementX and movementY. HTML <p id="log">Move your mouse around.</p> JavaScript function logMovement(event) { log.insertAdjacentHTML('afterbegin', `movement: ${event.movementX}, ${event.movementY}<br>`); while (log.childNodes.length > 128) log.lastChild.remove() } const log = document.getElementById('log'); document.addEventListener('m...
... Candidate Recommendation Initial definition ...
MouseEvent.movementY - Web APIs
The movementY read-only property of the MouseEvent interface provides the difference in the Y coordinate of the mouse pointer between the given event and the previous mousemove event. In other words, the value of the property is computed like this: currentEvent.movementY = currentEvent.screenY - previousEvent.screenY. Syntax var yShift = instanceOfMouseEvent.movementY; Return value A number Example This example logs the amount of mouse movement using movementX and movementY. HTML <p id="log">Move your mouse around.</p> JavaScript function logMovement(event) { log.innerText = `movement: ${event.movementX}, ${event.movementY}\n${log.innerText}`; } const log = document.getElementById('log'); document.addEventListener('mousemove', logMovement); Result Specifications Specific...
...movementY. HTML <p id="log">Move your mouse around.</p> JavaScript function logMovement(event) { log.innerText = `movement: ${event.movementX}, ${event.movementY}\n${log.innerText}`; } const log = document.getElementById('log'); document.addEventListener('mousemove', logMovement); Result Specifications Specification Status Comment Pointer LockThe definition of 'MouseEvent.movementY' in that specification. Candidate Recommendation Initial definition. ...
MouseEvent.pageX - Web APIs
Web › API › MouseEvent › pageX
This includes any portion of the document not currently visible. Being based on the edge of the document as it is, this property takes into account any horizontal scrolling of the page. For example, if the page is scrolled such that 200 pixels of the left side of the document are scrolled out of view, and the mouse is clicked 100 pixels inward from the left edge of the view, the value returned by pageX will be 300. Originally, this property was defined as a long integer. The CSSOM View Module redefined it as a double float. See the Browser compatibility section for details. ...
...ouse is clicked 100 pixels inward from the left edge of the view, the value returned by pageX will be 300. Originally, this property was defined as a long integer. The CSSOM View Module redefined it as a double float. See the Browser compatibility section for details. See Page in Coordinate systems for some additional information about coordinates specified in this fashion. Syntax var pageX = MouseEvent.pageX; Value A floating-point number of pixels from the left edge of the document at which the mouse was clicked, regardless of any scrolling or viewport positioning that may be in effect. This property was originally specified in the Touch Events specification as a long integer, but was redefined in the CSSOM View Module to be a double-precision floating-point number to allow for subpixel pre...
MouseEvent.region - Web APIs
Web › API › MouseEvent › region
Example Example of using the event.region combined with CanvasRenderingContext2D.addHitRegion() method. ...
... Example Example of using the event.region combined with CanvasRenderingContext2D.addHitRegion() method. ...
MouseEvent.screenX - Web APIs
Early versions of the spec defined this as an integer referring to the number of pixels. See the "Browser compatibility" section for details. Example This example displays your mouse's coordinates whenever you trigger the mousemove event. ...
...erly, as the following example demonstrates: function checkClickMap(e) { if (e.screenX < 50) doRedButton(); if (50 <= e.screenX && e.screenX < 100) doYellowButton(); if (e.screenX >= 100) doRedButton(); } Specifications Specification Status Comment CSS Object Model (CSSOM) View ModuleThe definition of 'screenX' in that specification. Working Draft Redefines MouseEvent from long to double. Document Object Model (DOM) Level 3 Events SpecificationThe definition of 'MouseEvent.screenX' in that specification. Obsolete No change from Document Object Model (DOM) Level 2 Events Specification. Document Object Model (DOM) Level 2 Events SpecificationThe definition of 'MouseEvent.sceenX' in that specification. Obsolete Initial definition ...
MouseEvent.screenY - Web APIs
Early versions of the spec defined this as an integer referring to the number of pixels. See the "Browser compatibility" section for details. Example This example displays your mouse's coordinates whenever you trigger the mousemove event. ...
...('#screen-log'); document.addEventListener('mousemove', logKey); function logKey(e) { screenLog.innerText = ` Screen X/Y: ${e.screenX}, ${e.screenY} Client X/Y: ${e.clientX}, ${e.clientY}`; } Result Specifications Specification Status Comment CSS Object Model (CSSOM) View ModuleThe definition of 'screenY' in that specification. Working Draft Redefines MouseEvent from long to double. Document Object Model (DOM) Level 3 Events SpecificationThe definition of 'MouseEvent.screenY' in that specification. Obsolete No change from Document Object Model (DOM) Level 2 Events Specification. Document Object Model (DOM) Level 2 Events SpecificationThe definition of 'MouseEvent.sceenY' in that specification. Obsolete Initial definition ...
MouseEvent.WEBKIT_FORCE_AT_FORCE_MOUSE_DOWN - Web APIs
Non-standard This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future. MouseEvent.WEBKIT_FORCE_AT_FORCE_MOUSE_DOWN is a proprietary, WebKit-specific, static numeric property whose value is the minimum force necessary for a force click. Because WEBKIT_FORCE_AT_FORCE_MOUSE_DOWN is a static property of MouseEvent, you always use it as MouseEvent.WEBKIT_FORCE_AT_FORCE_MOUSE_DOWN, rather than as a property of a MouseEvent instance. Specifications Not part of any specification. Apple has a description at the Mac Developer Library. ...
MouseEvent.WEBKIT_FORCE_AT_MOUSE_DOWN - Web APIs
Non-standard This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future. MouseEvent.WEBKIT_FORCE_AT_MOUSE_DOWN is a proprietary, WebKit-specific, static numeric property whose value is the minimum force necessary for a normal click. Because WEBKIT_FORCE_AT_MOUSE_DOWN is a static property of MouseEvent, you always use it as MouseEvent.WEBKIT_FORCE_AT_MOUSE_DOWN, rather than as a property of a MouseEvent instance. Specifications Not part of any specification. Apple has a description at the Mac Developer Library. ...
MouseEvent.getModifierState() - Web APIs
See the document of KeyboardEvent.getModifierState() for details. Syntax var active = event.getModifierState(keyArg); Returns A Boolean Parameters keyArg A modifier key value. The value must be one of the KeyboardEvent.key values which represent modifier keys or "Accel". This is case-sensitive. Specifications Specification Status Comment Document Object Model (DOM) Level 3 Events SpecificationThe definition of 'getModifierState()' in that specification. ...
MouseEvent.mozInputSource - Web APIs
Non-standard This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future. The MouseEvent.mozInputSource read-only property on MouseEvent provides information indicating the type of device that generated the event. This lets you, for example, determine whether a mouse event was generated by an actual mouse or by a touch event (which might affect the degree of accuracy with which you interpret the coordinates associated with the event). Syntax var source = instanceOfMouseEvent.mozInputSource; Return value The following values are possible. Constant name Value ...
MouseEvent.offsetX - Web APIs
The offsetX read-only property of the MouseEvent interface provides the offset in the X coordinate of the mouse pointer between that event and the padding edge of the target node. Syntax var xOffset = instanceOfMouseEvent.offsetX; Return value A double floating point value. Early versions of the spec defined this as an integer. See the Browser compatibility section for details. Specifications Specification Status Comment CSS Object Model (CSSOM) View ModuleThe definition of 'MouseEvent' in that specification. Working Draft Initial definition ...
MouseEvent.offsetY - Web APIs
The offsetY read-only property of the MouseEvent interface provides the offset in the Y coordinate of the mouse pointer between that event and the padding edge of the target node. Syntax var yOffset = instanceOfMouseEvent.offsetY; Return value A double floating point value. Early versions of the spec defined this as an integer. See the Browser compatibility section for details. Specifications Specification Status Comment CSS Object Model (CSSOM) View ModuleThe definition of 'MouseEvent' in that specification. Working Draft Initial definition ...
MouseEvent.pageY - Web APIs
Web › API › MouseEvent › pageY
This property takes into account any vertical scrolling of the page. Syntax var pos = event.pageY; Originally, this property was defined as a long integer. The CSSOM View Module redefined it as a double float. See the Browser compatibility section for details. Examples var pageY = event.pageY; Specifications Specification Status Comment CSS Object Model (CSSOM) View ModuleThe definition of 'pageY' in that specification. Working Draft Redefined from long to double. Touch EventsThe definition of 'pageY' in that specification. ...
MouseEvent.webkitForce - Web APIs
Non-standard This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future. MouseEvent.webkitForce is a proprietary, WebKit-specific numeric property whose value represents the amount of pressure that is being applied on the touchpad or touchscreen. Specifications Not part of any specification. Apple has a description at the Mac Developer Library. ...
MouseEvent.x - Web APIs
Web › API › MouseEvent › x
The MouseEvent.x property is an alias for the MouseEvent.clientX property. Specifications Specification Status Comment CSS Object Model (CSSOM) View ModuleThe definition of 'MouseEvent.x' in that specification. Working Draft Initial definition ...
Index - Web APIs
Web › API › Index
ment interface returns the tag name of the element on which it's called. 1171 Element.toggleAttribute() API, Element, Method, Reference The toggleAttribute() method of the Element interface toggles a Boolean attribute (removing it if it is present and adding it if it is not present) on the given element. 1172 Element: DOMActivate event API, Input, Mouse Events, MouseEvent, Reference, activate event, events, onactivate The DOMActivate event is fired at an element when it becomes active, such as when it is clicked on using the mouse or a keypress is used to navigate to it. 1173 Element: DOMMouseScroll event API, DOM, DOMMouseScroll, Deprecated, Element, Event, Input, Non-standard, Reference, mouse, scrolling The DOM DOMMouseScroll event is...
...d obsolete MozMousePixelScroll event is fired at an Element asynchronously when a mouse wheel or similar device is operated. It's represented by the MouseScrollEvent interface. 1182 Element: afterscriptexecute event Event, Non-standard, Reference The afterscriptexecute event is fired after a script has been executed. 1183 Element: auxclick event Element, Event, MouseEvent, Reference, UI, auxclick, events, mouse The auxclick event is fired at an Element when a non-primary pointing device button (any mouse button other than the primary--usually leftmost--button) has been pressed and released both within the same element. 1184 Element: beforescriptexecute event DOM, Non-standard, Reference The beforescriptexecute event is fired when a scrip...
...uted. Cancelling the event prevents the script from executing. 1185 Element: blur event API, DOM, Element, Event, FocusEvent, Reference, blur, onblur The blur event fires when an element has lost focus. The main difference between this event and focusout is that focusout bubbles while blur does not. 1186 Element: click event API, DOM, Element, Event, Interface, MouseEvent, NeedsBrowserCompatibility, NeedsMobileBrowserCompatibility, Reference, UI, click, events, mouse An element receives a click event when a pointing device button (such as a mouse's primary mouse button) is both pressed and released while the pointer is located inside the element. 1187 Element: compositionend event Event, Reference The compositionend event is fired when a...
...And 47 more matches
nsIDOMWindowUtils
PRUint32 compareCanvases(in nsIDOMHTMLCanvasElement aCanvas1, in nsIDOMHTMLCanvasElement aCanvas2, out unsigned long aMaxDifference); double computeAnimationDistance(in nsIDOMElement element, in AString property, in AString value1, in AString value2); nsICompositionStringSynthesizer createCompositionStringSynthesizer(); Obsolete since Gecko 38.0 void disableNonTestMouseEvents(in boolean aDisable); boolean dispatchDOMEventViaPresShell(in nsIDOMNode aTarget, in nsIDOMEvent aEvent, in boolean aTrusted); nsIDOMElement elementFromPoint(in float aX, in float aY, in boolean aIgnoreRootScrollFrame, in boolean aFlushLayout); void enterModalState(); nsIDOMElement findElementWithViewId(in nsViewID aId); void focus(in nsIDOMEleme...
...tClassName(in object aObj); boolean sendKeyEvent(in AString aType, in long aKeyCode, in long aCharCode, in long aModifiers, [optional] in boolean aPreventDefault); Obsolete since Gecko 15.0 boolean sendKeyEvent(in AString aType, in long aKeyCode, in long aCharCode, in long aModifiers, [optional] in unsigned long aAdditionalFlags); Deprecated since Gecko 38.0 void sendMouseEvent(in AString aType, in float aX, in float aY, in long aButton, in long aClickCount, in long aModifiers, [optional] in boolean aIgnoreRootScrollFrame); void sendMouseEventToWindow(in AString aType, in float aX, in float aY, in long aButton, in long aClickCount, in long aModifiers, [optional] in boolean aIgnoreRootScrollFrame); void sendMouseScrollEvent(in AString aType, in float ...
..., in float aY, in double aDeltaX, in double aDeltaY, in double aDeltaZ, in unsigned long aDeltaMode, in long aModifiers, in long aLineOrPageDeltaX, in long aLineOrPageDeltaY, in unsigned long aOptions); void sendNativeKeyEvent(in long aNativeKeyboardLayout, in long aNativeKeyCode, in long aModifierFlags, in AString aCharacters, in AString aUnmodifiedCharacters); void sendNativeMouseEvent(in long aScreenX, in long aScreenY, in long aNativeMessage, in long aModifierFlags, in nsIDOMElement aElement); nsIQueryContentEventResult sendQueryContentEvent(in unsigned long aType, in unsigned long aOffset, in unsigned long aLength, in long aX, in long aY); Obsolete since Gecko 31.0 nsIQueryContentEventResult sendQueryContentEvent(in unsigned long aType, in unsigned long a...
...And 8 more matches
Event reference
tent. change Event DOM L2, HTML5 The change event is fired for <input>, <select>, and <textarea> elements when a change to the element's value is committed by the user. chargingchange Event Battery status The battery begins or stops charging. chargingtimechange Event Battery status The chargingTime attribute has been updated. click MouseEvent DOM L3 A pointing device button has been pressed and released on an element. close Event WebSocket A WebSocket connection has been closed. complete IndexedDB A transaction successfully completed. complete OfflineAudioCompletionEvent Web Audio APIThe definition of 'OfflineAudioCompletionEvent' in that specification. The rendering of an...
... a passage of text has been completed or canceled. compositionstart CompositionEvent DOM L3 The composition of a passage of text is prepared (similar to keydown for a keyboard input, but works with other inputs such as speech recognition). compositionupdate CompositionEvent DOM L3 A character is added to a passage of text being composed. ...
... devicechange Event Media Capture and Streams A media device such as a camera, microphone, or speaker is connected or removed from the system. devicemotion DeviceMotionEvent Device Orientation Events Fresh data is available from a motion sensor. ...
...And 5 more matches
nsIFrameLoader
Attributes Attribute Type Description delayRemoteDialogs boolean depthTooGreat boolean Find out whether the loader's f...
...nt handling. void sendCrossProcessKeyEvent( in AString aType, in long aKeyCode, in long aCharCode, in long aModifiers, [optional] in boolean aPreventDefault ); Parameters aType The event type. aKeyCode The key code. aCharCode The character code. aModifiers The modifier flags. aPreventDefault Whether or not to prevent default actions from being performed. ...
...sKeyEvent( in AString aType, in long aKeyCode, in long aCharCode, in long aModifiers, [optional] in boolean aPreventDefault ); Parameters aType The event type. aKeyCode The key code. aCharCode The character code. aModifiers The modifier flags. aPreventDefault Whether or not to prevent default actions from being performed. sendCrossProcessMouseEvent() Creates and sends a MouseEvent to the content viewport's process. ...
... in long aModifiers, [optional] in boolean aPreventDefault ); Parameters aType The event type. aKeyCode The key code. aCharCode The character code. aModifiers The modifier flags. aPreventDefault Whether or not to prevent default actions from being performed. sendCrossProcessMouseEvent() Creates and sends a MouseEvent to the content viewport's process. See nsIDOMWindowUtils.sendMouseEvent() for details; this method is its equivalent for cross-process event handling. void sendCrossProcessMouseEvent( in AString aType, in float aX, in float aY, in long aButton, in long aClickCount, in long aModifiers, [optional] in boolean aIgnoreRootScrollFrame ); Parameters aType The type of mouse event to send. aX The X coordinate of the mouse. aY The Y coordinate of the m...
Force Touch events - Web APIs
bkitmouseforcechanged This event is fired each time the amount of pressure changes. This event first fires after the mousedown event and stops firing before the mouseup event. ...
...Apple has a description at the Mac Developer Library. ...
...Apple has a description at the Mac Developer Library. ...
...kitmouseforceup, mousemove, and mouseup event objects: MouseEvent.webkitForce Read only The amount of pressure currently being applied to the trackpad/touchscreen Constants These constants are useful for determining the relative intensity of the pressure indicated by MouseEvent.webkitForce: MouseEvent.WEBKIT_FORCE_AT_MOUSE_DOWN Read only Minimum force necessary for a normal click MouseEvent.WEBKIT_FORCE_AT_FORCE_MOUSE_DOWN Read only Minimum force necessary for a force click Specifications Not part of any specification. Apple has a description at the Mac Developer Library. ...
source-editor.jsm
d end positions of the range of characters. The "Focus" event is sent when the editor is focused. It has no properties. The "Blur" event is sent when the editor loses focus. It has no properties. MouseMove The "MouseMove" event is sent when the user moves the mouse pointer over a line of text content. It has the following properties: Property Type Description event MouseEvent The DOM "mousemove" event. x Number The X-coordinate of the mouse pointer relative to the document being edited; that is, 0 is the top of the very first line of text in the document, regardless of vertical scroll position.. y Number The Y-coordinate of the mouse pointer relative to the document being edited; that is, 0 is the left edge of the very first column of ...
...oordinate of the mouse pointer relative to the document being edited; that is, 0 is the left edge of the very first column of text in the document, regardless of horizontal scroll position. MouseOver The "MouseOver" event is sent when the user moves the mouse pointer enters a line of text content. It has the following properties: Property Type Description event MouseEvent The DOM "mouseover" event. x Number The X-coordinate of the mouse pointer relative to the document being edited; that is, 0 is the top of the very first line of text in the document, regardless of vertical scroll position. y Number The Y-coordinate of the mouse pointer relative to the document being edited; that is, 0 is the left edge of the very first column of t...
... Y-coordinate of the mouse pointer relative to the document being edited; that is, 0 is the left edge of the very first column of text in the document, regardless of horizontal scroll position. MouseOut The "MouseOut" event is sent when the user moves the mouse pointer over a line of text content. It has the following properties: Property Type Description event MouseEvent The DOM "mouseout" event. x Number The X-coordinate of the mouse pointer relative to the document being edited; that is, 0 is the top of the very first line of text in the document, regardless of vertical scroll position.. y Number The Y-coordinate of the mouse pointer relative to the document being edited; that is, 0 is the left edge of the very first column of t...
Pointer events - Web APIs
ove/pointermove, etc.). Consequently, pointer event types are intentionally similar to mouse event types. Additionally, a pointer event contains the usual properties present in mouse events (client coordinates, target element, button states, etc.) in addition to new properties for other forms of input: pressure, contact geometry, tilt, etc. In fact, the PointerEvent interface inherits all of the MouseEvent properties, thus facilitating the migration of content from mouse events to pointer events. Terminology active buttons state The condition when a pointer has a non-zero value for the buttons property. For example, in the case of a pen, when the pen has physical contact with the digitizer, or at least one button is depressed while hovering. active pointer Any pointer input device that can p...
...a pointer. Interfaces The primary interface is the PointerEvent interface which has a constructor plus several event types and associated global event handlers. The standard also includes some extensions to the Element and Navigator interfaces. The following sub-sections contain short descriptions of each interface and property. PointerEvent interface The PointerEvent interface extends the MouseEvent interface and has the following properties. (All of the following properties are Read only .) pointerId A unique identifier for the pointer causing the event. width The width (magnitude on the X axis), in CSS pixels, of the contact geometry of the pointer. height the height (magnitude on the Y axis), in CSS pixels, of the contact geometry of the pointer. pressure the normalized pressure...
...en there were no other active pens contacting the screen. Determining button states Some pointer devices, such as mouse and pen, support multiple buttons and the button presses can be chorded i.e. depressing an additional button while another button on the pointer device is already depressed. To determine the state of button presses, pointer events uses the button and buttons properties of the MouseEvent interface (that PointerEvent inherits from). The following table provides the values of button and buttons for the various device button states. Device Button State button buttons Neither buttons nor touch/pen contact changed since last event -1 -- Mouse move with no buttons pressed, Pen moved while hovering with no buttons pressed -- 0 ...
WheelEvent - Web APIs
ht="50" fill="#fff" stroke="#D4DDE4" stroke-width="2px" /><text x="153.5" y="30" font-size="12px" font-family="Consolas,Monaco,Andale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">UIEvent</text></a><polyline points="191,25 201,20 201,30 191,25" stroke="#D4DDE4" fill="none"/><line x1="201" y1="25" x2="231" y2="25" stroke="#D4DDE4"/><a xlink:href="/docs/Web/API/MouseEvent" target="_top"><rect x="231" y="1" width="100" height="50" fill="#fff" stroke="#D4DDE4" stroke-width="2px" /><text x="281" y="30" font-size="12px" font-family="Consolas,Monaco,Andale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">MouseEvent</text></a><polyline points="331,25 341,20 341,30 331,25" stroke="#D4DDE4" fill="none"/><line x1="341" y1="25" x2="371" y2...
... stroke-width="2px" /><text x="421" y="30" font-size="12px" font-family="Consolas,Monaco,Andale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">WheelEvent</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Constructor WheelEvent() Creates a WheelEvent object. Properties This interface inherits properties from its ancestors, MouseEvent, UIEvent, and Event. WheelEvent.deltaXRead only Returns a double representing the horizontal scroll amount. WheelEvent.deltaYRead only Returns a double representing the vertical scroll amount. WheelEvent.deltaZRead only Returns a double representing the scroll amount for the z-axis. WheelEvent.deltaModeRead only Returns an unsigned long representing the unit of the delta* values' sc...
... WheelEvent.DOM_DELTA_PIXEL 0x00 The delta* values are specified in pixels. WheelEvent.DOM_DELTA_LINE 0x01 The delta* values are specified in lines. WheelEvent.DOM_DELTA_PAGE 0x02 The delta* values are specified in pages. Methods This interface doesn't define any specific methods, but inherits methods from its ancestors, MouseEvent, UIEvent, and Event. Specifications Specification Status Comment UI EventsThe definition of 'The WheelEvent interface' in that specification. Working Draft Document Object Model (DOM) Level 3 Events SpecificationThe definition of 'WheelEvent' in that specification. Obsolete Initial definition. ...
Coordinate systems - CSS: Cascading Style Sheets
to which the event has been delivered. The origin is inset by the distances specified by padding-left and padding-top. Client The "client" coordinate system uses as its origin the top-left corner of the viewport or browsing context in which the event occurred. This is the entire viewing area in which the document is presented. Scrolling is not a factor. On a desktop computer, for example, the MouseEvent.clientX and MouseEvent.clientY properties indicate the position of the mouse cursor at the moment the event occurred, relative to the top-left corner of the browser window. The top-left corner of the window is always (0, 0), regardless of the content of the document or any scrolling that may have been done. In other words, scrolling the document will change the client coordinates of a given posit...
...bly fairly obvious what this is: it's the coordinate system where the origin is located at the top-left corner of the user's entire screen space. This means that the position of a given point within a document will change if the containing window is moved, for example, or if the user's screen geometry changes (by changing display resolution or by adding or removing monitors to their system). The MouseEvent.screenX and MouseEvent.screenY properties give the coordinates of a mouse event's position relative to the screen's origin. Example Let's take a look at an example. This simple example creates a set of nested boxes. Whenever the mouse enters, moves around inside, or exits the inner box, the corresponding event is handled by updating a set of informational messages within the box, listing out th...
...lector(".log"); function setCoords(e, type) { let idX = type + "X"; let idY = type + "Y"; document.getElementById(idX).innerText = e[idX]; document.getElementById(idY).innerText = e[idY]; } A reference to the <div> inside the inner box which contains the paragraphs that will show the coordinate information is fetched into log. The setCoords() function is designed to accept as input a MouseEvent and the name of the origin to use when obtaining the coordinates. The implementation is then quite simple. The variables idX and idY are set to strings with the names of the properties corresponding to the coordinates in the given coordinate system. For example, if the value of type is "page", then idX is "pageX" and idY is "pageY". Handling the mouse events setCoords() is called by the event h...
Miscellaneous - Archive of obsolete content
via mousedown and mouseup events). When the mouse wheel is clicked, event.button will be equal to 1. ...
...eel is clicked, event.button will be equal to 1. ...
nsIDOMMouseScrollEvent
dom/interfaces/events/nsIDOMMouseScrollEvent.idlScriptable This interface represents a mouse scroll wheel event. 1.0 66 Introduced Gecko 1.9.1 Inherits from: nsIDOMMouseEvent Last changed in Gecko 1.9.1 (Firefox 3.5 / Thunderbird 3.0 / SeaMonkey 2.0) Gecko 1.9.2 note Prior to Gecko 1.9.2, this inherited from nsISupports instead of from nsIDOMMouseEvent. Method overview void initMouseScrollEvent(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in nsIDOMAbstractView viewArg, in long detailArg, in long screenXArg, in long screenYArg, in long clientXArg, in long clientYArg, in boolean ctrlKeyArg, in boolean altKeyArg, in boolean shiftKeyArg, in boolean metaKeyArg, in unsigned short buttonArg, in nsIDOMEventTarget relatedTarge...
...se false. ...
Pointer Lock API - Web APIs
document. This is a simple event and contains no extra data. document.addEventListener('pointerlockerror', lockError, false); document.addEventListener('mozpointerlockerror', lockError, false); function lockError(e) { alert("Pointer lock failed"); } Note: until Firefox 50 the above events were prefixed with moz in Firefox. Extensions to mouse events The Pointer lock API extends the normal MouseEvent interface with movement attributes. Two new attributes to mouse events--movementX and movementY--provide the change in mouse positions. The values of the parameters are the same as the difference between the values of MouseEvent properties, screenX and screenY, which are stored in two subsequent mousemove events, eNow and ePrevious. In other words, the Pointer lock parameter movementX = eNow.scre...
...The movementX and movementY properties continue to provide the mouse's change in position. ...
Touch events - Web APIs
to work. Alternatively, some frameworks have taken to refiring touch events as mouse events for this same purpose. (This example is oversimplified and may result in strange behavior. ...
...createEvent("MouseEvents"); var type = null; var touch = null; switch (evt.type) { case "touchstart": type = "mousedown"; touch = evt.changedTouches[0]; break; case "touchmove": type = "mousemove"; touch = evt.changedTouches[0]; break; case "touchend": type = "mouseup"; touch = evt.changedTouches[0]; break; } newEvt.initMouseEvent(type, true, true, evt.originalTarget.ownerDocument.defaultView, 0, touch.screenX, touch.screenY, touch.clientX, touch.clientY, evt.ctrlKey, evt.altKey, evt.shiftKey, evt.metaKey, 0, null); evt.originalTarget.dispatchEvent(newEvt); } Calling preventDefault() only on a second touch One technique for preventing things like pinchZoom on a page is to call preventDefault() on the second to...
UIEvent.pageX - Web APIs
Web › API › UIEvent › pageX
You should not expect to find pageX on any non-mouse events. ...
...te existing code as soon as possible. Syntax var pos = event.pageX Value An integer value, in pixels, indicating the X coordinate at which the mouse pointer was located when the event occurred. This value is relative to the left edge of the entire document, regardless of the current horizontal scrolling offset of the document. Examples For an example, see the documentation for the standard MouseEvent.pageX property, which you should use instead. Specifications This property is not part of any specification. See MouseEvent.pageX instead. ...
Window.onbeforeinstallprompt - Web APIs
example uses the beforeinstallprompt event to make an install button operable, by using the event inside a click handler. ...
...to make an install button operable, by using the event inside a click handler. ...
Box-shadow generator - CSS: Cascading Style Sheets
: addShadow, swapShadow : swapShadow, addCssClass : addCssClass, disableClass : disableClass, deleteShadow : deleteShadow, setActiveClass : setActiveClass, setActiveShadow : setActiveShadow } })(); /** * Layer Manager */ var LayerManager = (function LayerManager() { var stacks = []; var active = { node : null, stack : null } var elements = {}; var mouseEvents = function mouseEvents(e) { var node = e.target; var type = node.getAttribute('data-type'); if (type === 'subject') setActiveStack(stacks[node.id]); if (type === 'disable') { Tool.disableClass(node.parentNode.id); setActiveStack(stacks['element']); } if (type === 'add') active.stack.addLayer(); if (type === 'layer') active.stack.setActiveLayer(node); ...
...yId('z-index'); elem = document.querySelectorAll('#layer_menu [data-type="subject"]'); size = elem.length; for (var i = 0; i < size; i++) { var S = new Stack(elem[i]); stacks[elem[i].id] = S; container.appendChild(S.container); Tool.addCssClass(elem[i].id); } active.stack = stacks['element']; stacks['element'].show(); layerManager.addEventListener("click", mouseEvents); layerMenu.addEventListener("click", mouseEvents); ButtonManager.subscribe("before", function(value) { if (value === false && active.stack === stacks['before']) setActiveStack(stacks['element']) if (value === true && active.stack !== stacks['before']) setActiveStack(stacks['before']) }); ButtonManager.subscribe("after", function(value) { if (value === false &...
User input and controls - Developer guides
rue); window.addEventListener("keyup", handleKeyUp, true); where handleKeyDown and handleKeyUp are the functions implementing the controls about the keydown and keyup events. Note: Have a look at the Events reference and KeyboardEvent guide to find out more about keyboard events. Mouse The events occurring when the user interacts with a pointing device such as a mouse are represented by the MouseEvent DOM Interface. Common mouse events include click, dblclick, mouseup, and mousedown. The list of all events using the Mouse Event Interface is provided in the Events reference. When the input device is a mouse, you can also control user input through the Pointer Lock API and implement Drag & Drop (see below). Finger touch When developing web applications meant to be installed on touchscreen dev...
...nd allow you to move the ball directly using the mouse. ...
Appendix C: Avoiding using eval in Add-ons - Archive of obsolete content
s has the added bonus that all other event listeners for that Element (and the corresponding bubbling/capturing chain) will fire as well, so this method will have the closed resemblance to a real user event. // Fake a command event var event = document.createEvent("Events"); event.initEvent("command", true, true); document.getElementById("mymenu").dispatchEvent(event); // Fake a mouse click var mouseEvent = document.createEvent("MouseEvents"); event.initMouseEvent("click", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null); document.getElementById("mylabel").dispatchEvent(mouseEvent); Please see the corresponding documentation on how to use and initialize particular event types. Alternative: Element.click() XUL and HTML elements have a pre-defined .click() method that will...
Adding a new event
s header file should be used only for defining generic purpose event class such as a common super class of various event classes. Probably, you shouldn't use this for your class. ContentEvents.h This header file should be used for defining internal event classes which are dispatched in content and do not represent user action. Typically, events in this header file never cross process boundary. MouseEvents.h This header file should be used for defining input events from pointing devices such as mouse. TextEvents.h This header file should be used for defining input events from keyboard or IME and also other text edit related events like querying focused content information. TouchEvents.h This header file should be used for defining input events from touch devices. MiscEvents.h If the new eve...
Browser API
() Indicates whether the browser <iframe> is currently muted. Event-related methods In order to manage the browser <iframe>'s content, many new events were added (see below). The following methods are used to deal with those events: The <iframe> gains support for the methods of the EventTarget interface addEventListener(), removeEventListener(), and dispatchEvent(). HTMLIFrameElement.sendMouseEvent() Sends a MouseEvent to the <iframe>'s content. Utility methods Last, there are some utility methods, useful for apps that host a browser <iframe>. HTMLIFrameElement.getStructuredData() Retrieves any structured microdata (and hCard and hCalendar microformat data) contained in the HTML loaded in the browser <iframe> and returns it as JSON. Browser API methods removed in Firefox 65 In Fi...
JavaScript-DOM Prototypes in Mozilla
(function(){ try { Image.prototype.src = 1; } catch(ex){ alert(ex); } })(); This demonstrates that the Image constructor, a host object supported in nearly all browsers for Mac and Windows, has a prototype property, and that an attempt to modify the prototype's src - property results in an error. Another example would be modifying the pageX property of a MouseEvent instance. The pageX property actually needs a patch because it doesn't get set correctly in initMouseEvent bug 411031. Here is a diagram that shows the prototype layout of a HTMLDivElement in Mozilla: HTMLDivElement.prototype | |.__proto__ | HTMLElement.prototype | |.__proto__ | Element.prototype ...
nsIDOMMozTouchEvent
ch screens. This differs from tracking mouse events in that touch events can be generated independently for each finger touching the screen. This lets you process multi-finger touch gestures and actions. dom/interfaces/events/nsIDOMMozTouchEvent.idlScriptable Please add a summary to this article. ...
nsIDOMSimpleGestureEvent
The following events are generated: MozSwipeGesture - Generated when the user completes a swipe across across the input device. ...
CSS Object Model (CSSOM) - Web APIs
CSS Typed Object Model CSSImageValue CSSKeywordValue CSSMathInvert CSSMathMax CSSMathMin CSSMathNegate CSSMathProduct CSSMathSum CSSMathValue CSSMatrixComponent CSSNumericArray CSSNumericValue CSSPerspective CSSPositionValue CSSRotate CSSScale CSSSkew CSSSkewX CSSSkewY CSSStyleValue CSSTransformComponent CSS...
Hit regions and accessibility - Web APIs
in current web browsers; check the browser compatibility tables). CanvasRenderingContext2D.addHitRegion() Adds a hit region to the canvas. CanvasRenderingContext2D.removeHitRegion() Removes the hit region with the specified id from the canvas. CanvasRenderingContext2D.clearHitRegions() Removes all hit regions from the canvas. You can add a hit region to your path and check for the MouseEvent.region property to test if your mouse is hitting your region, for example. <canvas id="canvas"></canvas> <script> var canvas = document.getElementById('canvas'); var ctx = canvas.getContext('2d'); ctx.beginPath(); ctx.arc(70, 80, 10, 0, 2 * Math.PI, false); ctx.fill(); ctx.addHitRegion({id: 'circle'}); canvas.addEventListener('mousemove', function(event) { if (event.region) { alert('hit ...
CloseEvent.initCloseEvent() - Web APIs
teEvent() method. This method must be called to set the event before it is dispatched, using EventTarget.dispatchEvent(). Once dispatched, it doesn't do anything anymore. Do not use this method anymore as it is deprecated. Instead use specific event constructors, like CloseEvent(). The page on Creating and triggering events gives more information about the way to use these. Syntax event.initMouseEvent(type, canBubble, cancelable, wasClean, reasonCode, reason); Parameters type the string to set the event's type to. Possible types for mouse events include: click, mousedown, mouseup, mouseover, mousemove, mouseout. canBubble whether or not the event can bubble. Sets the value of Event.bubbles. cancelable whether or not the event's default action can be prevented. Sets the value of Event.
Document.createEvent() - Web APIs
tomEvent, are deprecated. Use event constructors instead. Creates an event of the type specified. The returned object should be first initialized and can then be passed to EventTarget.dispatchEvent. Syntax var event = document.createEvent(type); event is the created Event object. type is a string that represents the type of event to be created. Possible event types include "UIEvents", "MouseEvents", "MutationEvents", and "HTMLEvents". See Notes section for details. Example // Create the event. var event = document.createEvent('Event'); // Define that the event name is 'build'. event.initEvent('build', true, true); // Listen for the event. elem.addEventListener('build', function (e) { // e.target matches elem }, false); // Target can be any Element or other EventTarget. elem.dispat...
DragEvent() - Web APIs
This constructor is used to create a synthetic DragEvent object. Although this interface has a constructor, it is not possible to create a useful DataTransfer object from script, since DataTransfer objects have a processing and security model that is coordinated by the browser during drag-and-drops. This interface inherits properties from MouseEvent and Event. Syntax event = new DragEvent(type, DragEventInit); Arguments type Is a DOMString representing the name of the event (see DragEvent event types). DragEventInitOptional Is a DragEventInit dictionary, having the following fields: "dataTransfer", optional and defaults to "null". The type is DataTransfer. The DragEventInit dictionary inherits from the MouseEventInit dictionary. Specifications Specification S...
DragEvent - Web APIs
Web › API › DragEvent
The DragEvent interface is a DOM event that represents a drag and drop interaction. The user initiates a drag by placing a pointer device (such as a mouse) on the touch surface and then dragging the pointer to a new location (such as another DOM element). Applications are free to interpret a drag and drop interaction in an application-specific way. This interface inherits properties from MouseEvent and Event. Properties DragEvent.dataTransfer Read only The data that is transferred during a drag and drop interaction. Constructors Although this interface has a constructor, it is not possible to create a useful DataTransfer object from script, since DataTransfer objects have a processing and security model that is coordinated by the browser during drag-and-drops. DragEvent() Creates a sy...
Element: DOMActivate event - Web APIs
The DOMActivate event is fired at an element when it becomes active, such as when it is clicked on using the mouse or a keypress is used to navigate to it. ...
Element: auxclick event - Web APIs
The auxclick event is fired at an Element when a non-primary pointing device button (any mouse button other than the primary--usually leftmost--button) has been pressed and released both within the same element. auxclick is fired after the mousedown and mouseup events have been fired, in that order. Bubbles Yes Cancelable Yes Interface MouseEvent Event handler property onauxclick Preventing default actions For the vast majority of browsers that map middle click to opening a link in a new tab, including Firefox, it is possible to cancel this behavior by calling preventDefault() from within an auxclick event handler. When listening for auxclick events originating on elements that do not support input or navigation, you will often want to ...
Element: click event - Web APIs
An element receives a click event when a pointing device button (such as a mouse's primary mouse button) is both pressed and released while the pointer is located inside the element. Bubbles Yes Cancelable Yes Interface MouseEvent Event handler property onclick If the button is pressed on one element and the pointer is moved outside the element before the button is released, the event is fired on the most specific ancestor element that contained both elements. click fires after both the mousedown and mouseup events have fired, in that order. Usage notes The MouseEvent object passed into the event handler for click has its detail property set to the number of times the target was clicked. In other words, detail will be 2 for a double-click, ...
Element: contextmenu event - Web APIs
ayed at the bottom left of the focused element, unless the element is a tree, in which case the context menu is displayed at the bottom left of the current row. Any right-click event that is not disabled (by calling the event's preventDefault() method) will result in a contextmenu event being fired at the targeted element. Bubbles Yes Cancelable Yes Interface MouseEvent Event handler property oncontextmenu Examples In this example, the default action of the contextmenu event is canceled using preventDefault() when the contextmenu event is fired at the first paragraph. As a result, the first paragraph will do nothing when right-clicked, while the second paragraph will show the standard context menu offered by your browser. HTML <p id="noCont...
Element: dblclick event - Web APIs
The dblclick event fires when a pointing device button (such as a mouse's primary button) is double-clicked; that is, when it's rapidly clicked twice on a single element within a very short span of time. dblclick fires after two click events (and by extension, after two pairs of mousedown and mouseup events). Bubbles Yes Cancelable Yes Interface MouseEvent Event handler property ondblclick Examples This example toggles the size of a card when you double click on it. JavaScript const card = document.querySelector('aside'); card.addEventListener('dblclick', function (e) { card.classList.toggle('large'); }); HTML <aside> <h3>My Card</h3> <p>Double click to resize this object.</p> </aside> CSS aside { background: #fe9; border-ra...
Element.innerHTML - Web APIs
Web › API › Element › innerHTML
m.innerHTML += timeStr + ": " + msg + "<br/>"; } log("Logging mouse events inside this container..."); The log() function creates the log output by getting the current time from a Date object using toLocaleTimeString(), and building a string with the timestamp and the message text. Then the message is appended to the box with the class "log". ...
Element: mousedown event - Web APIs
ce button is pressed while the pointer is inside the element. Note: This differs from the click event in that click is fired after a full click action occurs; that is, the mouse button is pressed and released while the pointer remains inside the same element. mousedown is fired the moment the button is initially pressed. Bubbles Yes Cancelable Yes Interface MouseEvent Event handler property onmousedown Examples The following example uses the mousedown, mousemove, and mouseup events to allow the user to draw on an HTML5 canvas. Its functionality is simple: the thickness of the line is set to 1, and the color is always black. When the page loads, constants myPics and context are created to store a reference to the canvas and the 2d context w...
Element: mouseenter event - Web APIs
The mouseenter event is fired at an Element when a pointing device (usually a mouse) is initially moved so that its hotspot is within the element at which the event was fired. Bubbles No Cancelable No Interface MouseEvent Event handler property onmouseenter Usage notes Though similar to mouseover, mouseenter differs in that it doesn't bubble and it isn't sent to any descendants when the pointer is moved from one of its descendants' physical space to its own physical space. One mouseenter event is sent to each element of the hierarchy when entering them. Here 4 events are sent to the four elements of the hierarchy when the pointer reaches the text. A single mouseover event is sent to the deepest element of the DOM tree, then it bubbles up...
Element: mouseleave event - Web APIs
This means that mouseleave is fired when the pointer has exited the element and all of its descendants, whereas mouseout is fired when the pointer leaves the element or leaves one of the element's descendants (even if the pointer is still within the element). ...
Element: mousemove event - Web APIs
Its functionality is simple: the thickness of the line is set to 1, and the color is always black. ...
Element: mouseout event - Web APIs
eout event is fired at an Element when a pointing device (usually a mouse) is used to move the cursor so that it is no longer contained within the element or one of its children. mouseout is also delivered to an element if the cursor enters a child element, because the child element obscures the visible area of the element. Bubbles Yes Cancelable Yes Interface MouseEvent Event handler property onmouseout Examples The following examples show the use of the mouseout event. mouseout and mouseleave The following example illustrates the difference between mouseout and mouseleave events. The mouseleave event is added to the <ul> to color the list purple whenever the mouse exits the <ul>. mouseout is added to the list to color the targeted element ...
Element: mouseover event - Web APIs
The mouseover event is fired at an Element when a pointing device (such as a mouse or trackpad) is used to move the cursor onto the element or one of its child elements. Bubbles Yes Cancelable Yes Interface MouseEvent Event handler property onmouseover Examples The following example illustrates the difference between mouseover and mouseenter events. HTML <ul id="test"> <li>item 1</li> <li>item 2</li> <li>item 3</li> </ul> JavaScript let test = document.getElementById("test"); // This handler will be executed only once when the cursor // moves over the unordered list test.addEventListener("mouseenter", function( event ) { // highlight the mouseenter target event.target.style.color = "purple"; // reset the color after a short...
Element: mouseup event - Web APIs
The mouseup event is fired at an Element when a button on a pointing device (such as a mouse or trackpad) is released while the pointer is located inside it. mouseup events are the counterpoint to mousedown events. Bubbles Yes Cancelable Yes Interface MouseEvent Event handler property onmouseup Examples The following example uses the mousedown, mousemove, and mouseup events to allow the user to draw on an HTML5 canvas. Its functionality is simple: the thickness of the line is set to 1, and the color is always black. When the page loads, constants myPics and context are created to store a reference to the canvas and the 2d context we will use to draw. Drawing begins when the mousedown event fires. First we store the x and y coordinates of th...
Element: webkitmouseforcechanged event - Web APIs
The non-standard webkitmouseforcechanged event is fired by Safari each time the amount of pressure changes on the trackpad/touchscreen. Bubbles Unknown Cancelable Unknown Interface MouseEvent webkitmouseforcechanged is a proprietary, WebKit-specific event introduced by Apple to support their Force Touch events feature. This event first fires after the mousedown event and stops firing before the mouseup event. Specifications Not part of any specification. Apple has a description at the Mac Developer Library. ...
Element: webkitmouseforcedown event - Web APIs
It is part of the Force Touch events feature. Specifications Not part of any specification. Apple has a description at the Mac Developer Library. ...
Element: webkitmouseforceup event - Web APIs
The non-standard webkitmouseforceup event is fired by Safari at an Element some time after the webkitmouseforcedown event, when pressure on the button has been reduced sufficiently to end the "force click". Bubbles Unknown Cancelable Unknown Interface MouseEvent webkitmouseforceup is a proprietary, WebKit-specific event. It is part of the Force Touch events feature. Specifications Not part of any specification. Apple has a description at the Mac Developer Library. ...
Element: webkitmouseforcewillbegin event - Web APIs
tell the system not to trigger any default Force Touch actions if and when the click turns into a Force Touch event. To instruct macOS not to engage any default Force Touch actions if the user apply enough pressure to activate a Force Touch event, call preventDefault() on the webkitmouseforcewillbegin event object. Bubbles Unknown Cancelable Unknown Interface MouseEvent webkitmouseforcewillbegin is a proprietary, WebKit-specific event. It is part of the Force Touch events feature. Specifications Not part of any specification. Apple has a description at the Mac Developer Library. ...
Comparison of Event Targets - Web APIs
ose event.target DOM Event Interface The DOM element on the lefthand side of the call that triggered this event, eg: element.dispatchEvent(event) event.currentTarget DOM Event Interface The EventTarget whose EventListeners are currently being processed. As the event capturing and bubbling occurs, this value changes. event.relatedTarget DOM MouseEvent Interface Identifies a secondary target for the event. event.explicitOriginalTarget Event.webidl If the event was retargeted for some reason other than an anonymous boundary crossing, this will be set to the target before the retargeting occurs. For example, mouse events are retargeted to their parent node when they happen over text nodes (bug 185889), and in that case .target...
Event - Web APIs
Web › API › Event
BeforeUnloadEvent BlobEvent ClipboardEvent CloseEvent CompositionEvent CSSFontFaceLoadEvent CustomEvent DeviceLightEvent DeviceMotionEvent DeviceOrientationEvent DeviceProximityEvent DOMTransactionEvent DragEvent EditingBeforeInputEvent ErrorEvent FetchEvent FocusEvent GamepadEvent HashChangeEvent IDBVersionChangeEvent InputEvent KeyboardEvent MediaStreamEvent MessageEvent MouseEvent MutationEvent OfflineAudioCompletionEvent OverconstrainedError PageTransitionEvent PaymentRequestUpdateEvent PointerEvent PopStateEvent ProgressEvent RelatedEvent RTCDataChannelEvent RTCIdentityErrorEvent RTCIdentityEvent RTCPeerConnectionIceEvent SensorEvent StorageEvent SVGEvent SVGZoomEvent TimeEvent TouchEvent TrackEvent TransitionEvent UIEvent UserProximityEvent WebGL...
FocusEvent.relatedTarget - Web APIs
(if any) focusin The EventTarget receiving focus The EventTarget losing focus (if any) focusout The EventTarget losing focus The EventTarget receiving focus (if any) Note that many elements can't have focus, which is a common reason for relatedTarget to be null. relatedTarget may also be set to null for security reasons, like when tabbing in or out of a page. MouseEvent.relatedTarget is a similar property for mouse events. Syntax secondTarget = focusEvent.relatedTarget Specifications Specification Status Comment UI EventsThe definition of 'FocusEvent.relatedTarget' in that specification. Working Draft Document Object Model (DOM) Level 3 Events SpecificationThe definition of 'FocusEvent.relatedTarget' in that specificat...
GlobalEventHandlers.onauxclick - Web APIs
at click only fires for primary button clicks (e.g., left mouse button), while auxclick fires for non-primary button clicks. Historically, click has generally fired for the click of any device input button, although with browser behavior being somewhat inconsistent. Syntax target.onauxclick = functionRef; Value functionRef is a function name or a function expression. The function receives a MouseEvent object as its sole argument. Within the function, this will be the element upon which the event was triggered. Only one onauxclick handler can be assigned to an object at a time. You may prefer to use the EventTarget.addEventListener() method instead, since it's more flexible. Example In this example we define functions for two event handlers -- onclick and onauxclick. The former changes the c...
GlobalEventHandlers.onclick - Web APIs
t. It fires after the mousedown and mouseup events, in that order. Note: When using the click event to trigger an action, also consider adding this same action to the keydown event, to allow the use of that same action by people who don't use a mouse or a touch screen. Syntax target.onclick = functionRef; Value functionRef is a function name or a function expression. The function receives a MouseEvent object as its sole argument. Within the function, this will be the element upon which the event was triggered. Only one onclick handler can be assigned to an object at a time. You may prefer to use the EventTarget.addEventListener() method instead, since it's more flexible. Examples Detecting clicks This example simply changes the color of an element when it's clicked upon. HTML <div id="de...
GlobalEventHandlers.ondblclick - Web APIs
The ondblclick property of the GlobalEventHandlers mixin is an EventHandler that processes dblclick events on the given element. The dblclick event is raised when the user double clicks an element. It fires after two click events. Syntax target.ondblclick = functionRef; Value functionRef is a function name or a function expression. The function receives a MouseEvent object as its sole argument. Within the function, this will be the element upon which the event was triggered. Only one ondblclick handler can be assigned to an object at a time. You may prefer to use the EventTarget.addEventListener() method instead, since it's more flexible. Example This example logs the position of double clicks. HTML <p>Double click anywhere in this example.</p> <p id="log"></p> JavaScript let log = doc...
GlobalEventHandlers.onmousedown - Web APIs
The onmousedown property of the GlobalEventHandlers mixin is an EventHandler that processes mousedown events. The mousedown event fires when the user depresses the mouse button. Note: The opposite of onmousedown is onmouseup. Syntax target.onmousedown = functionRef; Value functionRef is a function name or a function expression. The function receives a MouseEvent object as its sole argument. Example This example reveals part of an image when you press and hold a mouse button. It uses the onmousedown, onmouseup, and onmousemove event handlers. HTML <div class="container"> <div class="view" hidden></div> <img src="https://udn.realityripple.com/samples/90/a34a525ace.jpg"> </div> CSS .container { width: 320px; height: 213px; background: black; } .view { position: absolute; ...
GlobalEventHandlers.onmousemove - Web APIs
Examples Tooltips This example creates link tooltips that follow your mouse. It uses the onmousemove, onmouseover, and onmouseout event handlers. ...
GlobalEventHandlers.onmouseup - Web APIs
The onmouseup property of the GlobalEventHandlers mixin is an EventHandler that processes mouseup events. The mouseup event fires when the user releases the mouse button. Note: The opposite of onmouseup is onmousedown. Syntax target.onmouseup = functionRef; Value functionRef is a function name or a function expression. The function receives a MouseEvent object as its sole argument. Example In this example, a piece of "toast" hides when you click down with the mouse, and reappears when you release. It uses the onmousedown and onmouseup event handlers. HTML <div class="container"> <div class="toaster"></div> <div class="toast">Hello world!</div> </div> CSS .container { position: absolute; left: 50%; bottom: 20px; transform: translate(-50%); } .toaster { width: 160px; he...
PointerEvent.PointerEvent() - Web APIs
ype long, that sets the value of the instance's PointerEvent.twist. pointerType -- optional and defaulting to "", of type DOMString, that sets the value of the instance's PointerEvent.pointerType. isPrimary -- optional and defaulting to false, of type Boolean, that sets the value of the instance's PointerEvent.isPrimary. Note: The PointerEventInit dictionary also accepts fields from the MouseEvent, UIEventInit and EventInit dictionaries. Example var moveEvent = new PointerEvent("pointermove"); var downEvent = new PointerEvent("pointerdown", {pointerId: 1, bubbles: true, cancelable: true, pointerType: "touch", width: 100, height: 100, isPrimary: true }); ...
PointerEvent.pointerType - Web APIs
not suported`); } }, false); Specifications Specification Status Comment Pointer EventsThe definition of 'pointerType' in that specification. Obsolete Initial definition. Pointer Events - Level 2The definition of 'pointerType' in that specification. Recommendation Non-stable version. CSS Object Model (CSSOM) View ModuleThe definition of 'MouseEvent' in that specification. Working Draft Redefines MouseEvent from long to double. This means that a PointerEvent whose pointerType is mouse will be a double. ...
PointerEvent - Web APIs
e such as a screen. A pointer's hit test is the process a browser uses to determine the target element for a pointer event. Typically, this is determined by considering the pointer's location and also the visual layout of elements in a document on screen media. Constructors PointerEvent() Creates a synthetic--and untrusted--PointerEvent. Properties This interface inherits properties from MouseEvent and Event. PointerEvent.pointerId Read only A unique identifier for the pointer causing the event. PointerEvent.width Read only The width (magnitude on the X axis), in CSS pixels, of the contact geometry of the pointer. PointerEvent.height Read only The height (magnitude on the Y axis), in CSS pixels, of the contact geometry of the pointer. PointerEvent.pressure Read only The normal...
Using Touch Events - Web APIs
e and click events when there is only a single active touch point. Multi-touch interactions involving two or more active touch points will usually only generate touch events. To prevent the emulated mouse events from being sent, use the preventDefault() method in the touch event handlers. For more information about the interaction between mouse and touch events, see Supporting both TouchEvent and MouseEvent. Basic steps This section contains a basic usage of using the above interfaces. See the Touch Events Overview for a more detailed example. Register an event handler for each touch event type. // Register touch event handlers someElement.addEventListener('touchstart', process_touchstart, false); someElement.addEventListener('touchmove', process_touchmove, false); someElement.addEventListener('...
UIEvent - Web APIs
Web › API › UIEvent
The UIEvent interface represents simple user interface events. UIEvent derives from Event. Although the UIEvent.initUIEvent() method is kept for backward compatibility, you should create a UIEvent object using the UIEvent() constructor. Several interfaces are direct or indirect descendants of this one: MouseEvent, TouchEvent, FocusEvent, KeyboardEvent, WheelEvent, InputEvent, and CompositionEvent. <div id="interfaceDiagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveAspectRatio="xMinYMin meet"><a xlink:href="/docs/Web/API/Event" target="_top"><rect x="1" y="1" width="75" height="50" fill="#f...
WheelEvent() - Web APIs
Constant Value Description DOM_DELTA_PIXEL 0x00 The delta values are specified in pixels. DOM_DELTA_LINE 0x01 The delta values are specified in lines. DOM_DELTA_PAGE 0x02 The delta values are specified in pages. The WheelEventInit dictionary also accepts fields from the MouseEventInit, UIEventInit and EventInit dictionaries. Specifications Specification Status Comment Document Object Model (DOM) Level 3 Events SpecificationThe definition of 'WheelEvent()' in that specification. Obsolete Initial definition ...
Web APIs
Web › API
amAudioDestinationNode MediaStreamAudioSourceNode MediaStreamAudioSourceOptions MediaStreamConstraints MediaStreamEvent MediaStreamTrack MediaStreamTrackAudioSourceNode MediaStreamTrackAudioSourceOptions MediaStreamTrackEvent MediaTrackConstraints MediaTrackSettings MediaTrackSupportedConstraints MerchantValidationEvent MessageChannel MessageEvent MessagePort Metadata MimeType MimeTypeArray MouseEvent MouseScrollEvent MouseWheelEvent MutationEvent MutationObserver MutationObserverInit MutationRecord N NDEFMessage NDEFReader NDEFReadingEvent NDEFRecord NDEFWriter NameList NamedNodeMap NavigationPreloadManager Navigator NavigatorConcurrentHardware NavigatorID NavigatorLanguage NavigatorOnLine NavigatorPlugins NavigatorStorage NetworkInformation Node NodeFilter NodeIterator NodeList ...
Creating and triggering events - Developer guides
n expression") so "this" will represent the element this.dispatchEvent(new CustomEvent('awesome', { bubbles: true, detail: { text: () => textarea.value } })) }); Triggering built-in events This example demonstrates simulating a click (that is programmatically generating a click event) on a checkbox using DOM methods. View the example in action. function simulateClick() { const event = new MouseEvent('click', { view: window, bubbles: true, cancelable: true }); const cb = document.getElementById('checkbox'); const cancelled = !cb.dispatchEvent(event); if (cancelled) { // A handler called preventDefault. alert("cancelled"); } else { // None of the handlers called preventDefault. alert("not cancelled"); } } ...
Overview of events and handlers - Developer guides
click', example_click_handler); or within the HTML page by adding the function as the value of the 'onclick' attribute, although this second approach is usually only used in very simple web pages. This code relies on the agreement that there is a kind of event called 'click' which will call any listener (or 'handler') function with an Event object argument (actually, in this case a derivative MouseEvent object) and which will be fired by HTML button elements after user interaction. The code has no visible effect until a user interacts with the button either by placing the mouse pointer over the HTML button and clicking on the left mouse button or by placing a finger or stylus of some kind on the screen above the HTML button; when that happens, the buttonDOMElement JavaScript object would call th...
Touch events (Mozilla experimental) - Developer guides
ed in Gecko/Firefox 12. This API allowed you to track the movement of the user's finger on a touch screen, monitoring the raw touch events generated by the system. Although touch events were based on -- and work similarly to -- mouse events, each event included an identifier that allowed you to track multiple fingers moving on the screen at the same time. Event fields Touch events were based upon MouseEvent, and thereby shared all mouse event fields. They included one additional field. streamId A unique integer identifying the finger generating the event. When the MozTouchDown event is built, a unique value is assigned to that finger. Corresponding MozTouchMove and MozTouchUp events for that finger will have the same streamId value. This lets you track each finger's movements on the t...