Name
MouseEvent.initMouseEvent( ): initialize the properties of a MouseEvent object â DOM Level 2 Events
Synopsis
void initMouseEvent(StringtypeArg
, booleancanBubbleArg
, booleancancelableArg
, AbstractViewviewArg
, longdetailArg
, longscreenXArg
, longscreenYArg
, longclientXArg
, longclientYArg
, booleanctrlKeyArg
, booleanaltKeyArg
, booleanshiftKeyArg
, booleanmetaKeyArg
, unsigned shortbuttonArg
, ElementrelatedTargetArg
);
Arguments
The many arguments to this method specify the initial values of the properties of this MouseEvent object, including the properties inherited from the Event and UIEvent interfaces. The name of each argument clearly indicates the property for which it specifies the value, so they are not listed individually here.
Description
This method initializes the various properties of a newly
created MouseEvent object. It may be called only on a MouseEvent
object created with Document.createEvent(
)
and only before that MouseEvent is passed to Element.dispatchEvent( )
.
See Also
Document.createEvent( )
,
Event.initEvent( )
, UIEvent.initUIEvent( )
Get JavaScript: The Definitive Guide, 5th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.