Initializes a UI event once it's been created.
event.initUIEvent(type, canBubble, cancelable, view, detail)
- The type of event.
- A boolean indicating whether the event should bubble up through the event chain or not (see bubbles).
- A boolean indicating whether the event can be canceled (see cancelable).
- The AbstractView associated with the event.
- A number specifying some detail information about the event, depending on the type of event. For mouse events, it indicates how many times the mouse has been clicked on a given screen location (usually 1).
var e = document.createEvent("UIEvents"); // creates a click event that bubbles, can be cancelled, // and with its view and detail property initialized to window and 1, // respectively e.initUIEvent("click", true, true, window, 1);
DOM Level 2 Events - method of UIEvent object
Document Tags and Contributors
Last updated by: Sheppy,