Newer Version Available
addMessageHandler()
Mounts a message handling function, used to handle messages sent from the Aura component
to the framed JavaScript app.
Sample
Used within a JavaScript app uploaded as a static resource and referenced by lightning:container, this example mounts a message handling
function. In a React app, functions must be mounted to be part of the document-object model
and rendered in the
output.
You can view and download this example in the Developerforce Github Repository.
Arguments
| Name | Type | Description |
|---|---|---|
| handler: (userMsg: any) => void | function | The function that handles messages sent from the Aura component. |
Response
None.