In this example, we can transmit data from the UI Builder WebPage component to the Web Page iframe element as well as transmit data from the Web Page iframe element to the UI Builder WebPage component.
<html><head></head><body><p>
Send to UIBuilder:<br/><textareaid="message"rows="5"cols="50">Hello from iframe!</textarea><br/><buttontype="button"onclick="send()">Send</button></p><br/><p>
Received from UIBuilder:<br/><textareaid="receive"rows="5"cols="50"readonly></textarea></p><script>functionsend(){constmessage=document.getElementById('message').value;window.parent.postMessage(message,'*');}window.onmessage=function(e){constreceive=document.getElementById('receive');receive.value=e.data;}</script></body></html>