spark.setParentRpc
function setParentRpc(rpc: Rpc | null): voidSet the RPC instance for proxied file saves.
In sandboxed iframes, authentication cookies are not available. This function sets up the RPC channel to the parent window, which performs saves on behalf of the sandboxed code.
This is called automatically by the spark worker setup. Most users don't need to call this directly.
Parameters
rpcRpc | null- RPC instance to the parent window, or null to disable proxied saves
Examples
// Parent window sets up RPC and passes it to iframe
const rpc = createParentRpc();
iframeWindow.setParentRpc(rpc);