Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

nsIDOMMouseScrollEvent

This article needs a technical review. How you can help.

This interface represents a mouse scroll wheel event.
1.0
37
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 relatedTargetArg, in long axis);

Attributes

Attribute Type Description
axis long Indicates which mouse wheel axis changed; this will be either HORIZONTAL_AXIS or VERTICAL_AXIS. Read only.

Constants

Constant Value Description
HORIZONTAL_AXIS 1 The horizontal (X) axis.
VERTICAL_AXIS 2 The vertical (Y) axis.

Methods

initMouseScrollEvent()

Initializes the progress event object.

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 relatedTargetArg,
  in long axis
);
Parameters
typeArg
The type of event. Must be one of "abort", "error", "load", "loadstart", or "progress".
canBubbleArg
Specifies whether or not the created event will bubble.
cancelableArg
Specifies whether or not the created event can be canceled.
viewArg
The nsIDOMAbstractView in which the event occurred.
detailArg
 
screenXArg
The X coordinate at which the event occurred, in screen coordinates.
screenYArg
The Y coordinate at which the event occurred, in screen coordinates.
clientXArg
The X coordinate at which the event occurred, in client coordinates.
clientYArg
The Y coordinate at which the event occurred, in client coordinates.
ctrlKeyArg
true if the control key was down when the event occurred, otherwise false.
altKeyArg
true if the Alt key was down when the event occurred, otherwise false.
shiftKeyArg
true if the shift key was down when the event occurred, otherwise false.
metaKeyArg
true if the meta key was down when the event occurred, otherwise false.
buttonArg
Indicates which mouse button was pressed when the event occurred, if any.
relatedTargetArg
The event target related to this event.
axis
The mouse wheel axis for this event; this is either HORIZONTAL_AXIS or VERTICAL_AXIS.

See also

Document Tags and Contributors

 Contributors to this page: Sheppy, kscarfone, Ms2ger, trevorh
 Last updated by: Sheppy,