Embedded events
When the studio is embedded on your website, it tells your page what happens inside it through postMessage, the browser standard that lets a page and an iframe talk. Each message is an object whose type starts with diamra:. Messages only travel between the studio and the page that frames it; on a direct visit to your store there is no page to talk to, so nothing is sent.
In this part
- Listen for messagesAdd one postMessage listener next to the Diamra embed snippet, check the origin and the iframe, then test it on your live page from the browser console.
- Messages from the studioEvery message the embedded Diamra studio sends your page, such as diamra:ready and diamra:estimate.accepted, with the fields each one carries.
- Commands to the studioThe commands your page can post to the embedded Diamra studio: sign the customer out, open another view, or tell it your page's address.