Event Callbacks
Listen for events from the widget by passing callback functions toHypermidWidget.init():
Event Reference
Status Values
TheonStatusChange callback receives these status values:
Events are communicated via
window.postMessage from the iframe. The embed script handles the plumbing automatically.
Programmatic Control
After initialization, control the widget dynamically:Update Configuration
Rebuild the widget with new settings:Set Swap Parameters
Change the swap pair and amount without reloading:Change Theme at Runtime
Override CSS Variables at Runtime
Destroy the Widget
Remove the widget from the DOM and clean up:Direct postMessage API
If you’re using the direct iframe embed (withoutembed.js), you can send messages directly: