Visit Mozilla.org

DOM:event.initUIEvent

From MDC

« Gecko DOM Reference

Contents

[edit] Summary

Initializes a UI event once it's been created.

[edit] Syntax

event.initUIEvent(type, canBubble, cancelable, view, detail) 

[edit] Parameters

type 
The type of event.
canBubble 
A boolean indicating whether the event should bubble up through the event chain or not (see bubbles).
cancelable 
A boolean indicating whether the event can be canceled (see cancelable).
view 
The AbstractView associated with the event.
detail 
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).

[edit] Example

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);

[edit] Specification

initUIEvent