initMouseEvent method
The initMouseEvent method is used to initialize the value of a MouseEvent created through the DocumentEvent interface. This method may only be called before the MouseEvent has been dispatched via the dispatchEvent method, though it may be called multiple times during that phase if necessary. If called multiple times, the final invocation takes precedence.
initMouseEvent(typeArg, canBubbleArg, cancelableArg, viewArg, detailArg, screenXArg, screenYArg, clientXArg, clientYArg, ctrlKeyArg, altKeyArg, shiftKeyArg, metaKeyArg, buttonArg, relatedTargetArg )
Parameters
String typeArg
Specifies the event type.
boolean canBubbleArg
Specifies whether or not the event can bubble.
boolean cancelableArg
Specifies whether or not the event's default action can be prevented.
AbstractView viewArg
Specifies the Event's AbstractView.
long detailArg
Specifies the Event's mouse click count.
long screenXArg
Specifies the Event's screen x coordinate
long screenYArg
Specifies the Event's screen y coordinate
long clientXArg
Specifies the Event's client x coordinate
long clientYArg
Specifies the Event's client y coordinate
boolean ctrlKeyArg
Specifies whether or not control key was depressed during the Event.
boolean altKeyArg
Specifies whether or not alt key was depressed during the Event.
boolean shiftKeyArg
Specifies whether or not shift key was depressed during the Event.
boolean metaKeyArg
Specifies whether or not meta key was depressed during the Event.
unsigned short buttonArg
Specifies the Event's mouse button.
EventTarget relatedTargetArg
Specifies the Event's related EventTarget.
Returns
void
这对您有帮助吗?