The initEvent method is deprecated. Use event constructors instead.
event.initEvent(type, bubbles, cancelable);
- The type of event.
A boolean indicating whether the event should bubble up through the event chain or not (see
A boolean indicating whether the event can be canceled (see
// create a click event that bubbles up and // cannot be canceled event.initEvent("click", true, false);
The page on Creating and triggering events has a more useful example.