mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-04 05:34:51 +00:00
How to open file/url in external app #308
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @robalexclark on GitHub (May 10, 2019).
Originally assigned to: @GregorBiswanger on GitHub.
I'm trying to open pdfs and external urls in the default browser for both applications (not within the electron app). I researched and found that there might be a way using the electron shell:
But the about does not work 'require is not defined' I appreciate I am probably missing something fundamental here! How do you access the electron js functions from your own js files?
@GregorBiswanger commented on GitHub (May 16, 2019):
You can open external URLs via the Electron.NET API in C#:
Electron.Shell.OpenExternalAsync("https://github.com/ElectronNET");Have a look at our demo app.
P.S. Running your own TypeScript / JavaScript code will be possible with the next major Electron.NET version.