Help Center

Local Navigation

Object: MessageEvent

Availability

BlackBerry® Device Software 6.0 or later

Extends

Event

The MessageEvent object extends the Event object and represents an event generated when an object receives a message. To create an instance of a MessageEvent, you must invoke Document.createEvent() with an input parameter of "MessageEvent".

MessageEvent properties

Property name

Type

Description

Status

Support level

Availability

data

any

Returns the message being sent.

read only

HTML 5

6.0 or later

origin

DOMString

Returns the origin of the document that sent the message (typically the scheme, hostname, and port of the document).

read only

HTML 5

6.0 or later

lastEventId

DOMString

Returns the last event ID string of the event source.

read only

HTML 5

6.0 or later

source

WindowProxy

Returns the WindowProxy of the browsing context of the Window object from which the message came.

read only

HTML 5

6.0 or later

ports

MessagePortArray

Returns the MessagePortArray being sent, if any.

read only

HTML 5

6.0 or later

MessageEvent methods

Method name

Description

Support level

Availability

initMessageEvent()

Initializes a MessageEvent.

HTML 5

6.0 or later

Previous topic: KeyboardEvent methods

Was this information helpful? Send us your comments.