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 relatedTargetArg, in long axis);

Attributes

AttributeTypeDescription
axislongIndicates which mouse wheel axis changed; this will be either HORIZONTAL_AXIS or VERTICAL_AXIS. Read only.

Constants

ConstantValueDescription
HORIZONTAL_AXIS1The horizontal (X) axis.
VERTICAL_AXIS2The 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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:35 次

字数:6066

最后编辑:7 年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文