WARCRAFT FOREVER / DEVELOPERS
Iframe integration
Use an isolated calculator and the existing message protocol.
The existing /embed/talents/v1.js script and WarcraftForeverTalents.mount() remain available for iframe isolation. You can also use the iframe route without our script. Pass class, editable, and optional build and display settings as query parameters. For state changes and automatic height, use the message protocol.
Direct iframe message protocol
Set parentOrigin to your exact origin and token to a random 8–128 character value in the iframe URL. Send a request to iframe.contentWindow with postMessage(request, 'https://warcraftforever.com').
{
protocol: 'warcraft-forever-talents',
version: 1,
kind: 'request',
token,
requestId: '1',
action: 'update',
options: { class: 'paladin', editable: false }
}The options object is the complete mount options. Responses carry the same request ID and either { ok: true, state } or { ok: false, error }. Events use kind: 'event' with event set to ready, change, complete, error, or height. A change event includes the committed build when available; edits clear its Point Order path. Every message carries the protocol name, version, and token. Check both event.source === iframe.contentWindow and event.origin === 'https://warcraftforever.com' before accepting a message.