initUIEvent method
Initializes a new user interface event that the createEvent method created.
Important As of Microsoft Edge, the
createEvent()/initEvent() constructor pattern for synthetic events is deprecated. See the Synthetic Events page for more information.![]() ![]() |
Syntax
object.initUIEvent(eventType, canBubble, cancelable, view, detail)Parameters
- eventType [in]
-
Type: String
One of the following values, or a user-defined custom event type.
- canBubble [in]
-
Type: Boolean
- cancelable [in]
-
Type: Boolean
- view [in]
-
Type: IHTMLWindow2
The active window object or null. This value is returned in the view property of the event. - detail [in]
-
Type: Integer
AnInteger value that specifies additional information. This value is returned in the detail property of the event.
Return value
Type: HRESULT
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Standards information
- Document Object Model (DOM) Level 3 Events Specification, Section 5.2.1
See also
- CompositionEvent
- DragEvent
- FocusEvent
- KeyboardEvent
- MouseEvent
- MouseWheelEvent
- SVGZoomEvent
- TextEvent
- UIEvent
- WheelEvent
Show:

