You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In native desktop mode, the full [Tauri JavaScript API](https://tauri.app/references/javascript/) is available via `window.__TAURI__`. This gives access to OS-level capabilities that browsers can't provide:
203
+
In native desktop mode, a subset of Tauri APIs are available via `window.__TAURI__`. PyWry bundles the **dialog** and **filesystem** plugins along with the **PyTauri IPC bridge** and the core **event system** — it does *not* expose the full Tauri plugin ecosystem.
204
+
205
+
!!! warning "PyWry uses `pytauri.pyInvoke()`, not `core.invoke()`"
206
+
All JS → Python calls go through `window.__TAURI__.pytauri.pyInvoke()`. Do not use `window.__TAURI__.core.invoke()` — it won't reach PyWry's command handlers.
Copy file name to clipboardExpand all lines: pywry/docs/docs/reference/events.md
+60-19Lines changed: 60 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -273,27 +273,68 @@ window.__PYWRY_TOOLBAR__.setValue("component-id", value) // Set value
273
273
274
274
### Tauri Access (Native Mode Only)
275
275
276
-
In native desktop mode, Tauri APIs are available:
276
+
In native desktop mode, a subset of Tauri APIs and the PyTauri IPC bridge are available via `window.__TAURI__`. PyWry does **not** expose the full Tauri plugin ecosystem — only the APIs listed below are bundled and configured.
277
+
278
+
!!! warning "Do not use `window.__TAURI__.core.invoke()`"
279
+
PyWry uses PyTauri for all JS → Python IPC. Call `window.__TAURI__.pytauri.pyInvoke()` instead of the standard Tauri `invoke()`. All registered [PyWry commands](#pytauri-commands) go through this path.
!!! note "Tauri APIs are only available in native desktop mode"
340
+
Check for `window.__TAURI__` before using any Tauri-specific API. In browser and notebook modes, only the `window.pywry` bridge is available — it abstracts the transport automatically.
0 commit comments