Newer Version Available

This content describes an older version of this product. View Latest

sendMessage()

Sends a message from the framed JavaScript code to the Aura component.

Sample

Used within a JavaScript app uploaded as a static resource and referenced by lightning:container, this example sends a message from the app to lightning:container.
1sendMessage() {
2  LCC.sendMessage({name: "General", value: this.state.messageToSend});
3}

You can view and download this example in the Developerforce Github Repository.

Arguments

Name Type Description
userMsg any While the data sent in the message is entirely under your control, by convention it’s an object with name and value fields.

Response

None.