Programmer's Guide > Interfaces > W3C MouseEvent interface > initMouseEvent method
  
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
StringtypeArg
Specifies the event type.
booleancanBubbleArg
Specifies whether or not the event can bubble.
booleancancelableArg
Specifies whether or not the event's default action can be prevented.
AbstractViewviewArg
Specifies the Event's AbstractView.
longdetailArg
Specifies the Event's mouse click count.
longscreenXArg
Specifies the Event's screen x coordinate
longscreenYArg
Specifies the Event's screen y coordinate
longclientXArg
Specifies the Event's client x coordinate
longclientYArg
Specifies the Event's client y coordinate
booleanctrlKeyArg
Specifies whether or not control key was depressed during the Event.
booleanaltKeyArg
Specifies whether or not alt key was depressed during the Event.
booleanshiftKeyArg
Specifies whether or not shift key was depressed during the Event.
booleanmetaKeyArg
Specifies whether or not meta key was depressed during the Event.
unsigned shortbuttonArg
Specifies the Event's mouse button.
EventTargetrelatedTargetArg
Specifies the Event's related EventTarget.
Returns
void