3rd-party apps
Users can install 3rd-party webapp via the Installer (it's on the desktop)
Developers who want their existing webapps to interact with win32 filesystem can do it with ease. It's simple, just adding a few lines of code to your existing webapps to pick, read & and write files.
Internally, 3rd-party webapps on win32.run are embedded inside iframe. In order to render your webapp, the X-Frame-Options
header should not to be set.
Just open the Installer on win32.run desktop, fetch and install your webapp. If it works, then you're good to go.
If you can't locate the Installer on the desktop, you might find it in the Start Menu.
Installation
NPM
Or Script Tag
Initialization
3rd-party webapps communicate with win32 through window.postMessage, therefore you should instantiate Win32 class when the window object is available. i.e. onMount
in Svelte, componentDidMount
in React.
But for whatever reason you can't, just put the initialization where you see fit. The communication channel will be setup later when it can.
Check if your webapp is running on win32.run
To check if your webapp is running on win32.run (as compared to running in its own browser tab)
You can use it to update the UI and logic of your webapp accordingly. Of course this method can't be run during server side rendering.
Last updated