Skip to main content
function sendIframeMessage<T>(el: null | HTMLIFrameElement, message: T): void;
Sends a message to an iframe.

Type Parameters

Type Parameter
T extends Record<string | number | symbol, unknown>

Parameters

ParameterTypeDescription
elnull | HTMLIFrameElementThe iframe element to send the message to.
messageTThe message to send to the iframe.

Returns

void