Download client/modules/parentWindow.ts from abhijeetsarkargis/MiniSearch: direct link, hf CLI and curl.
- Browser
- Download file 243 Bytes
-
https://huggingface.co/spaces/abhijeetsarkargis/MiniSearch/resolve/main/client/modules/parentWindow.ts
- Command line
-
hf download hf://spaces/abhijeetsarkargis/MiniSearch/client/modules/parentWindow.ts
-
curl -L -o parentWindow.ts https://huggingface.co/spaces/abhijeetsarkargis/MiniSearch/resolve/main/client/modules/parentWindow.ts
243 Bytes
| export function postMessageToParentWindow(message: unknown) { | |
| const parentWindow = self.parent; | |
| const targetOrigin = parentWindow?.[0]?.location?.ancestorOrigins?.[0]; | |
| if (targetOrigin) parentWindow.postMessage(message, targetOrigin); | |
| } | |