way you can receive results from the embed player. For security reasons, you can only listen to the demo and can't send to it. If you want to run glifs, register a key and run glifs via API. Additionally, check out Val.town + Web Fetcher Block for writing more advanced examples.
Here is the core iframe communication part. Your page recieves events from the glif iframe using postMessage API
<!doctypehtml><script>window.addEventListener("message", handleMessage,false);functionhandleMessage(event) {constallowedDomains= ["https://glif.app"];if (!allowedDomains.includes(event.origin)) {console.warn("ignoring message from untrusted origin");return; }constmessage=event.data;if (message.type ==="glifRunStarted") {// handle a glif run starting (e.g. show a loading indicator) } elseif (message.type ==="glifRunCompleted") {// handle a glif run completing (e.g. show the final image) } else {// currently only sends those 2 messages so nothing else here yet! }}</script>