mirror of
https://github.com/huggingface/lerobot.git
synced 2026-06-02 03:41:25 +00:00
13 lines
397 B
TypeScript
13 lines
397 B
TypeScript
// Utility to post a message to the parent window with custom URLSearchParams
|
|
export function postParentMessageWithParams(
|
|
setParams: (params: URLSearchParams) => void,
|
|
) {
|
|
const parentOrigin = "https://huggingface.co";
|
|
const searchParams = new URLSearchParams();
|
|
setParams(searchParams);
|
|
window.parent.postMessage(
|
|
{ queryString: searchParams.toString() },
|
|
parentOrigin,
|
|
);
|
|
}
|