TOC PREV NEXT INDEX

domref



initEvent


The initEvent method is used to initialize the value of an Event created through the DocumentEvent interface.

Syntax

event.initKeyEvent(type, bubbles, cancelable)
 

Parameters

type

The type of event

bubbles

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 (cancelable).


Example

// create a click event that bubbles up and 
 
// cannot be canceled
 
event.initEvent("click", 1, 0)
 

Notes

Events initialized in this way must have been created with the DocumentEvent interface method createEvent(). This method must be called to set the event before it is dispatched.

Specification

initEvent
 


Netscape Communications
http://developer.netscape.com
TOC PREV NEXT INDEX