Section 25.111. Event.initEvent( ): initialize the properties of a new event


25.111. Event.initEvent( ): initialize the properties of a new event

DOM Level 2 Events

25.111.1. Synopsis

 void initEvent(String eventTypeArg,                boolean canBubbleArg,                boolean cancelableArg); 

25.111.1.1. Arguments

eventTypeArg

The type of event. This may be one of the predefined event types, such as "load" or "submit", or it may be a custom type of your own choosing. Names that begin with "DOM" are reserved, however.


canBubbleArg

Whether the event will bubble.


cancelableArg

Whether the event can be canceled with preventDefault( ).

25.111.2. Description

This method initializes the type, bubbles, and cancelable properties of a synthetic Event object created by Document.createEvent( ). This method may be called on newly created Event objects only before they have been dispatched with the dispatchEvent( ) method of the Document or Element objects.

25.111.3. See Also

Document.createEvent( ), MouseEvent.initMouseEvent( ), UIEvent.initUIEvent( )




JavaScript. The Definitive Guide
JavaScript: The Definitive Guide
ISBN: 0596101996
EAN: 2147483647
Year: 2004
Pages: 767

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net