window.HemsyEmbed. The embed script must still be loaded on the page.
The API uses the original mode identifiers:
"scratch" is Sandbox mode and
"closet" is Bundle mode.Opening
Closing
Configuration with HemsyEmbedConfig
window.HemsyEmbedConfig is the JavaScript alternative to script-tag data attributes, and the only place to register event callbacks. Define it before the embed script loads:
When the same setting appears both on
HemsyEmbedConfig and as a script-tag
data attribute, the script attribute wins. Keep each setting in one place
to avoid surprises.