Spaces:
Paused
Paused
Download console/src/utils/pywebview.ts from mysticaldragon/HF: direct link, hf CLI and curl.
- Browser
- Download file 469 Bytes
-
https://huggingface.co/spaces/mysticaldragon/HF/resolve/main/console/src/utils/pywebview.ts
- Command line
-
hf download hf://spaces/mysticaldragon/HF/console/src/utils/pywebview.ts
-
curl -L -o pywebview.ts https://huggingface.co/spaces/mysticaldragon/HF/resolve/main/console/src/utils/pywebview.ts
469 Bytes
| /** | |
| * Shared access point for the legacy pywebview desktop bridge. | |
| * Keeping the bridge type here prevents runtime helpers from drifting apart. | |
| */ | |
| export type PyWebViewApi = NonNullable<Window["pywebview"]>["api"]; | |
| export type PyWebViewSaveFile = NonNullable<PyWebViewApi["save_file"]>; | |
| /** Return the legacy pywebview bridge when the old desktop shell injects it. */ | |
| export function getPyWebViewApi(): PyWebViewApi | undefined { | |
| return window.pywebview?.api; | |
| } | |