componentDidMount(){LCC.addMessageHandler(this.onMessage);}onMessage(msg){letname=msg.name;if(name==="General"){letvalue=msg.value;this.setState({messageReceived:value});}elseif(name==="Foo"){// A different response}} You can view and download this example in theDeveloperforc...
HTTP/1.1 301 Moved Permanently Date: Mon, 16 Dec 2019 20:17:10 GMT Content-Type: text/html; charset=iso-8859-1 Transfer-Encoding: chunked Connection: keep-alive Set-Cookie: __cfduid=d28390b5bfbe4b3eb4b4e293a80de8a291576527430; expires=Wed, 15-Jan-20 20:17:10 GMT; path=/; domain...
, this example unmounts a message handling function. componentwillunmount ( ) { lcc . removemessagehandler ( this . onmessage ) ; } you can view and download this example in the developerforce github repository . arguments name type description handler: (usermsg: any) => void ...
{ let name = msg . name ; if ( name === "general" ) { let value = msg . value ; this . setstate ( { messagereceived : value } ) ; } else if ( name === "foo" ) { // a different response } } you can view and download this example in the developerforce git...
{ let name = msg . name ; if ( name === "general" ) { let value = msg . value ; this . setstate ( { messagereceived : value } ) ; } else if ( name === "foo" ) { // a different response } } you can view and download this example in the developerforce git...