Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The JavaScript equivalent is messageport.

Methods

...

boolean

...

PostBSMessage(in

...

Dictionary

...

message)

The PostBSMessage() method does not accept nested dictionaries. The same is true for the PostJSMessage() BrightScript method.

Events

The following event occurs when a message is sent from BrightScript to JavaScript. It will appear as a MessagePortEvent event.

onbsmessage

MessagePortEvent

This event contains a single field:

readonly attribute any data;

The following script will iterate over all the fields received in the event:

...

In BrightScript, the roHtmlWidget.PostJSMessage() method can be used to post a message to JavaScript:

...

widget.PostJSMessage({

...

Param1:

...

"Data1",

...

Param2:

...

"Data2",

...

Param3:

...

"Data3"

...

})

Examples

The following script will send a collection of properties to BrightScript:

...