Function: isEmbedProtocolMessage()
ts
function isEmbedProtocolMessage(value: unknown): value is EmbedProtocolMessage;Whether value looks like a message in this protocol.
A message listener receives every post to the window, including a host's unrelated traffic and other embeds', so both ends need to reject foreign shapes before switching on type. This validates both the message name and its payload before narrowing: postMessage is runtime input, so a TypeScript union alone cannot make a malformed message safe.
Parameters
| Parameter | Type |
|---|---|
value | unknown |
Returns
value is EmbedProtocolMessage