Method: Document.createEvent()

Availability

BlackBerry® Device Software version 4.6 or later

The createEvent() method creates a new Event object of the given type.

If the event is to be dispatched via Node.dispatchEvent(), then the appropriate initialization method must be called after the event has been created, and before it is dispatched, in order to initialize the event’s values.

This method is used to create events when it is inconvenient or unnecessary for the user to create an event themselves.

Syntax

Document.createEvent( eventType )

Parameters

Parameter

Type

Description

eventType

String

The type of event to create.

Return values

Returns the new Event object.

Exceptions

Exception

Description

NOT_SUPPORTED_ERR

This error is thrown if the implementation does not support the specified Event interface.

See also

Event


Was this information helpful? Send us your comments.