Search completed in 1.39 seconds.
MouseEvent.initMouseEvent() - Web APIs
the
mouseevent.init
mouseevent() method initializes the value of a mouse event once it's been created (normally using the document.createevent() method).
... instead use specific event constructors, like
mouseevent().
... syntax event.init
mouseevent(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.
...And 10 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).
...
mouseevent derives from uievent, which in turn derives from event.
... though the
mouseevent.init
mouseevent() method is kept for backward compatibility, creating of a
mouseevent object should be done using the
mouseevent() constructor.
...And 37 more matches
MouseEvent() - Web APIs
the
mouseevent() constructor creates a new
mouseevent.
... syntax event = new
mouseevent(typearg,
mouseeventinit); values typearg is a domstring representing the name of the event.
...
mouseeventinit optional is a
mouseeventinit dictionary, having the following fields: "screenx", optional and defaulting to 0, of type long, that is the horizontal position of the mouse event on the user's screen; setting this value doesn't move the mouse pointer.
...And 3 more matches
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.
... 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.
...And 3 more matches
MouseEvent.button - Web APIs
the
mouseevent.button read-only property indicates which button was pressed on the mouse to trigger the event.
... note: do not confuse this property with the
mouseevent.buttons property, which indicates which buttons are pressed for all mouse events types.
... syntax var buttonpressed = instanceof
mouseevent.button return value a number representing a given button: 0: main button pressed, usually the left button or the un-initialized state 1: auxiliary button pressed, usually the wheel button or the middle button (if present) 2: secondary button pressed, usually the right button 3: fourth button, typically the browser back button 4: fifth button, typically the browser forward button as noted above, buttons may be configured differently to the standard "left to right" layout.
...And 2 more matches
MouseEvent.clientX - Web APIs
the clientx read-only property of the
mouseevent interface provides the horizontal coordinate within the application's client area at which the event occurred (as opposed to the coordinate within the page).
... syntax var x = instanceof
mouseevent.clientx return value a double floating point value, as redefined by the cssom view module.
... working draft redefines
mouseevent from long to double.
...And 2 more matches
MouseEvent.clientY - Web APIs
the clienty read-only property of the
mouseevent interface provides the vertical coordinate within the application's client area at which the event occurred (as opposed to the coordinate within the page).
... syntax var y = instanceof
mouseevent.clienty return value a double floating point value, as redefined by the cssom view module.
... working draft redefines
mouseevent from long to double.
...And 2 more matches
MouseEvent.relatedTarget - Web APIs
the
mouseevent.relatedtarget read-only property is the secondary target for the mouse event, if there is one.
... syntax var target = instanceof
mouseevent.relatedtarget return value an eventtarget object or null.
...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.
...And 2 more matches
MouseEvent.screenX - Web APIs
the screenx read-only property of the
mouseevent interface provides the horizontal coordinate (offset) of the mouse pointer in global (screen) coordinates.
... syntax var x = instanceof
mouseevent.screenx return value a double floating point value.
... working draft redefines
mouseevent from long to double.
...And 2 more matches
MouseEvent.screenY - Web APIs
the screeny read-only property of the
mouseevent interface provides the vertical coordinate (offset) of the mouse pointer in global (screen) coordinates.
... syntax var y = instanceof
mouseevent.screeny return value a double floating point value.
... working draft redefines
mouseevent from long to double.
...And 2 more matches
MouseEvent.altKey - Web APIs
the
mouseevent.altkey read-only property is a boolean that indicates whether the alt key was pressed or not when a given mouse event occurs.
... syntax var altkeypressed = instanceof
mouseevent.altkey return value a boolean, where true indicates that the key is pressed, and false indicates that the key is not pressed.
...to test the <code>altkey</code> property.</p> <p id="log"></p> javascript let log = document.queryselector('#log'); document.addeventlistener('click', logkey); function logkey(e) { log.textcontent = `the alt key is pressed: ${e.altkey}`; } result specifications specification status comment document object model (dom) level 3 events specificationthe definition of '
mouseevent.altkey' in that specification.
... document object model (dom) level 2 events specificationthe definition of '
mouseevent.altkey' in that specification.
MouseEvent.ctrlKey - Web APIs
the
mouseevent.ctrlkey read-only property is a boolean that indicates whether the ctrl key was pressed or not when a given mouse event occurs.
... syntax var ctrlkeypressed = instanceof
mouseevent.ctrlkey return value a boolean, where true indicates that the key is pressed, and false indicates that the key is not pressed.
...test the <code>ctrlkey</code> property.</p> <p id="log"></p> javascript let log = document.queryselector('#log'); document.addeventlistener('click', logkey); function logkey(e) { log.textcontent = `the ctrl key is pressed: ${e.ctrlkey}`; } result specifications specification status comment document object model (dom) level 3 events specificationthe definition of '
mouseevent.ctrlkey' in that specification.
... document object model (dom) level 2 events specificationthe definition of '
mouseevent.ctrlkey' in that specification.
MouseEvent.metaKey - Web APIs
the
mouseevent.metakey read-only property is a boolean that indicates whether the meta key was pressed or not when a given mouse event occurs.
... syntax var metakeypressed = instanceof
mouseevent.metakey return value a boolean, where true indicates that the key is pressed, and false indicates that the key is not pressed.
...test the <code>metakey</code> property.</p> <p id="log"></p> javascript let log = document.queryselector('#log'); document.addeventlistener('click', logkey); function logkey(e) { log.textcontent = `the meta key is pressed: ${e.metakey}`; } result specifications specification status comment document object model (dom) level 3 events specificationthe definition of '
mouseevent.metakey' in that specification.
... document object model (dom) level 2 events specificationthe definition of '
mouseevent.metakey' in that specification.
MouseEvent.shiftKey - Web APIs
the
mouseevent.shiftkey read-only property is a boolean that indicates whether the shift key was pressed or not when a given mouse event occurs.
... syntax var shiftkeypressed = instanceof
mouseevent.shiftkey return value a boolean, where true indicates that the key is pressed, and false indicates that the key is not pressed.
...t the <code>shiftkey</code> property.</p> <p id="log"></p> javascript let log = document.queryselector('#log'); document.addeventlistener('click', logkey); function logkey(e) { log.textcontent = `the shift key is pressed: ${e.shiftkey}`; } result specifications specification status comment document object model (dom) level 3 events specificationthe definition of '
mouseevent.shiftkey' in that specification.
... document object model (dom) level 2 events specificationthe definition of '
mouseevent.shiftkey' in that specification.
HTMLIFrameElement.sendMouseEvent()
the send
mouseevent() method of the htmliframeelement interface allows you to fake a mouse event and send it to the browser <iframe>'s content.
... syntax instanceofhtmliframeelement.send
mouseevent(type, x, y, button, clickcount, modifiers); returns void.
... examples var browser = document.queryselector('iframe'); browser.send
mouseevent("mousemove", x, y, 0, 0, 0); browser.send
mouseevent("mousedown", x, y, 0, 1, 0); browser.send
mouseevent("mouseup", x, y, 0, 1, 0); specification not part of any specification.
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.
... syntax var xshift = instanceof
mouseevent.movementx; return value a number example this example logs the amount of mouse movement using movementx and movementy.
... 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('mousemove', logmovement); result specifications specification status comment pointer lockthe definition of '
mouseevent.movementx' in that specification.
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.
... syntax var yshift = instanceof
mouseevent.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 specification status comment pointer lockthe definition of '
mouseevent.movementy' in that specification.
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 = instanceof
mouseevent.offsetx; return value a double floating point value.
... specifications specification status comment css object model (cssom) view modulethe definition of '
mouseevent' in that specification.
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 = instanceof
mouseevent.offsety; return value a double floating point value.
... specifications specification status comment css object model (cssom) view modulethe definition of '
mouseevent' in that specification.
MouseEvent.which - Web APIs
the
mouseevent.which read-only property indicates which button was pressed on the mouse to trigger the event.
... the standard alternatives to this property are
mouseevent.button and
mouseevent.buttons.
... syntax var buttonpressed = instanceof
mouseevent.which return value a number representing a given button: 0: no button 1: left button 2: middle button (if present) 3: right button for a mouse configured for left-handed use, the button actions are reversed.
MouseEvent.WEBKIT_FORCE_AT_FORCE_MOUSE_DOWN - Web APIs
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.
MouseEvent.WEBKIT_FORCE_AT_MOUSE_DOWN - Web APIs
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.
MouseEvent.mozInputSource - Web APIs
the
mouseevent.mozinputsource read-only property on
mouseevent provides information indicating the type of device that generated the event.
... syntax var source = instanceof
mouseevent.mozinputsource; return value the following values are possible.
MouseEvent.pageX - Web APIs
the pagex read-only property of the
mouseevent interface returns the x (horizontal) coordinate (in pixels) at which the mouse was clicked, relative to the left edge of the entire document.
... 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.
MouseEvent.region - Web APIs
the
mouseevent.region read-only property returns the id of the canvas hit region affected by the event.
... syntax var hitregion = instanceof
mouseevent.region return value a domstring representing the id of the hit region.
MouseEvent.x - Web APIs
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.
MouseEvent.y - Web APIs
the
mouseevent.y property is an alias for the
mouseevent.clienty property.
... specifications specification status comment css object model (cssom) view modulethe definition of '
mouseevent.y' in that specification.
MouseEvent.getModifierState() - Web APIs
the
mouseevent.getmodifierstate() method returns the current state of the specified modifier key: true if the modifier is active (i.e., the modifier key is pressed or locked), otherwise, false.
MouseEvent.pageY - Web APIs
the pagey read-only property of the
mouseevent interface returns the y (vertical) coordinate in pixels of the event relative to the whole document.
MouseEvent.webkitForce - Web APIs
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.
Index - Web APIs
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.
... 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.
... 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.
...And 45 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 disablenontest
mouseevents(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 send
mouseevent(in astring atype, in float ax, in float ay, in long abutton, in long aclickcount, in long amodifiers, [optional] in boolean aignorerootscrollframe); void send
mouseeventtowindow(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 sendnative
mouseevent(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
click
mouseevent dom l3 a pointing device button has been pressed and released on an element.
... contextmenu
mouseevent html5 the right button of the mouse is clicked (before the context menu is displayed).
... dblclick
mouseevent dom l3 a pointing device button is clicked twice on an element.
...And 8 more matches
nsIFrameLoader
d overview void activateframeevent(in astring atype, in boolean capture); void activateremoteframe(); void destroy(); void loadframe(); void loaduri(in nsiuri auri); void sendcrossprocesskeyevent(in astring atype, in long akeycode, in long acharcode, in long amodifiers, [optional] in boolean apreventdefault); void sendcrossprocess
mouseevent(in astring atype, in float ax, in float ay, in long abutton, in long aclickcount, in long amodifiers, [optional] in boolean aignorerootscrollframe); void updatepositionandsize(in nsiframe aiframe); native code only!
... sendcrossprocess
mouseevent() creates and sends a
mouseevent to the content viewport's process.
... see nsidomwindowutils.send
mouseevent() for details; this method is its equivalent for cross-process event handling.
... void sendcrossprocess
mouseevent( 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.
source-editor.jsm
it has the following properties: property type description event
mouseevent the dom "mousemove" event.
...it has the following properties: property type description event
mouseevent the dom "mouseover" event.
...it has the following properties: property type description event
mouseevent the dom "mouseout" event.
Pointer Lock API - Web APIs
extensions to mouse events the pointer lock api extends the normal
mouseevent interface with movement attributes.
...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.
... locked state when pointer lock is enabled, the standard
mouseevent properties clientx, clienty, screenx, and screeny are held constant, as if the mouse is not moving.
Pointer events - Web APIs
in fact, the pointerevent interface inherits all of the
mouseevent properties, thus facilitating the migration of content from mouse events to pointer events.
... pointerevent interface the pointerevent interface extends the
mouseevent interface and has the following properties.
... to determine the state of button presses, pointer events uses the button and buttons properties of the
mouseevent interface (that pointerevent inherits from).
UIEvent.pageX - Web APIs
a standardized version of pagex was added to the
mouseevent interface, however, and is well-supported.
... examples for an example, see the documentation for the standard
mouseevent.pagex property, which you should use instead.
...see
mouseevent.pagex instead.
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...
... properties this interface inherits properties from its ancestors,
mouseevent, uievent, and event.
... methods this interface doesn't define any specific methods, but inherits methods from its ancestors,
mouseevent, uievent, and event.
Coordinate systems - CSS: Cascading Style Sheets
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
mouseevent.screenx and
mouseevent.screeny properties give the coordinates of a mouse event's position relative to the screen's origin.
... the setcoords() function is designed to accept as input a
mouseevent and the name of the origin to use when obtaining the coordinates.
JavaScript-DOM Prototypes in Mozilla
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 init
mouseevent bug 411031.
nsIDOMMouseScrollEvent
1.0 66 introduced gecko 1.9.1 inherits from: nsidom
mouseevent 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 nsidom
mouseevent.
... see also nsidom
mouseevent nsidomevent nsidomeventtarget ...
DragEvent() - Web APIs
this interface inherits properties from
mouseevent and event.
... the drageventinit dictionary inherits from the
mouseeventinit dictionary.
Element: click event - Web APIs
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.
... 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.
PointerEvent.pointerType - Web APIs
css object model (cssom) view modulethe definition of '
mouseevent' in that specification.
... working draft redefines
mouseevent from long to double.
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
mouse the events occurring when the user interacts with a pointing device such as a mouse are represented by the
mouseevent dom interface.
... tutorials touch events guide managing screen orientation using fullscreen mode dragging and dropping multiple items drag operations guide reference
mouseevent keyboardevent touch events pointer_lock_api screen orientation api fullscreen api drag & drop content editable ...
Miscellaneous - Archive of obsolete content
simulating mouse and key events https://developer.mozilla.org/samples/domref/dispatchevent.html also, new in firefox 3 / gecko 1.9: var utils = window.queryinterface(components.interfaces.nsiinterfacerequestor) .getinterface(components.interfaces.nsidomwindowutils); utils.send
mouseevent("mousedown", 10, 10, 0, 1, 0); utils.send
mouseevent("mouseup", 10, 10, 0, 1, 0); getting the currently selected text from browser.xul overlay context: var selectedtext = document.commanddispatcher.focusedwindow.getselection().tostring(); or: content.getselection(); // |window| object is implied; i.e., window.content.getselection() or: getbrowserselection(); // |window| object is implied...
Appendix C: Avoiding using eval in Add-ons - Archive of obsolete content
// 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.init
mouseevent("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.
Adding a new event
mouseevents.h this header file should be used for defining input events from pointing devices such as mouse.
Browser API
htmliframeelement.send
mouseevent() sends a
mouseevent to the <iframe>'s content.
nsIDOMMozTouchEvent
last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) inherits from: nsidom
mouseevent method overview void initmoztouchevent(in domstring typearg, in boolean canbubblearg, in boolean cancelablearg, in nsidomabstractview viewarg, in long detailarg, in long screenxarg, in long screenyarg, in long clientxarg, ...
nsIDOMSimpleGestureEvent
1.0 66 introduced gecko 1.9.1 inherits from: nsidom
mouseevent last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) the nsidomsimplegestureevent interface is the datatype for all mozilla-specific simple gesture events in the document object model.
CSS Object Model (CSSOM) - Web APIs
cssviewportrule elementcssinlinestyle fontface fontfaceset fontfacesetloadevent geometryutils getstyleutils linkstyle medialist mediaquerylist mediaquerylistevent mediaquerylistlistener screen stylesheet stylesheetlist transitionevent several other interfaces are also extended by the cssom-related specifications: document, window, element, htmlelement, htmlimageelement, range,
mouseevent, and svgelement.
Element: DOMActivate event - Web APIs
bubbles yes cancelable yes interface
mouseevent examples <svg xmlns="http://www.w3.org/2000/svg" version="1.2" baseprofile="tiny" xmlns:ev="http://www.w3.org/2001/xml-events" width="6cm" height="5cm" viewbox="0 0 600 500"> <desc>example: invoke an ecmascript function from a domactivate event</desc> <!-- ecmascript to change the radius --> <script type="application/ecmascript"><![cdata[ function change(evt) { var circle = evt.target; var currentradius = circle.getfloattrait("r"); if (currentradius == 100) circle.setfloattrait("r", currentradius * 2); ...
Element: auxclick event - Web APIs
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.
Element: contextmenu event - Web APIs
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.
Element: dblclick event - Web APIs
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.
Element.innerHTML - Web APIs
we add a second method that logs information about
mouseevent based events (such as mousedown, click, and mouseenter): function logevent(event) { var msg = "event <strong>" + event.type + "</strong> at <em>" + event.clientx + ", " + event.clienty + "</em>"; log(msg); } then we use this as the event handler for a number of mouse events on the box that contains our log: var boxelem = document.queryselector(".box"); boxelem.addeventlistener...
Element: mousedown event - Web APIs
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.
Element: mouseenter event - Web APIs
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.
Element: mouseleave event - Web APIs
bubbles no cancelable no interface
mouseevent event handler property onmouseleave mouseleave and mouseout are similar but differ in that mouseleave does not bubble and mouseout does.
Element: mousemove event - Web APIs
bubbles yes cancelable yes interface
mouseevent event handler property onmousemove examples the following example uses the mousedown, mousemove, and mouseup events to allow the user to draw on an html5 canvas.
Element: mouseout event - Web APIs
bubbles yes cancelable yes interface
mouseevent event handler property onmouseout examples the following examples show the use of the mouseout event.
Element: mouseover event - Web APIs
bubbles yes cancelable yes interface
mouseevent event handler property onmouseover examples the following example illustrates the difference between mouseover and mouseenter events.
Element: mouseup event - Web APIs
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.
Event - Web APIs
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...
Force Touch events - Web APIs
event properties the following property is known to be available on the webkitmouseforcewillbegin, mousedown, webkitmouseforcechanged, webkitmouseforcedown, webkitmouseforceup, 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 for...
Using Touch Events - Web APIs
for more information about the interaction between mouse and touch events, see supporting both touchevent and
mouseevent.
Touch events - Web APIs
it is only intended as a guide.) function ontouch(evt) { evt.preventdefault(); if (evt.touches.length > 1 || (evt.type == "touchend" && evt.touches.length > 0)) return; var newevt = document.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.init
mouseevent(type, true, ...
UIEvent - Web APIs
several interfaces are direct or indirect descendants of this one:
mouseevent, touchevent, focusevent, keyboardevent, wheelevent, inputevent, and compositionevent.
WheelEvent() - Web APIs
the wheeleventinit dictionary also accepts fields from the
mouseeventinit, uieventinit and eventinit dictionaries.
Window.onbeforeinstallprompt - Web APIs
window.addeventlistener("beforeinstallprompt", function(beforeinstallpromptevent) { beforeinstallpromptevent.preventdefault(); // prevents immediate prompt display // shows prompt after a user clicks an "install" button installbutton.addeventlistener("click", function(
mouseevent) { // you should not use the
mouseevent here, obviously beforeinstallpromptevent.prompt(); }); installbutton.hidden = false; // make button operable }); ...
Web APIs
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
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.
Overview of events and handlers - Developer guides
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.