Last active
March 19, 2022 10:35
-
-
Save Mlocik97/b0996f377b53cf3c7a26b3d8ce33914d to your computer and use it in GitHub Desktop.
if you want to open link from electron app in browser.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
import { shell } from 'electron'; | |
</script> | |
<div> | |
<a href="url" on:click|preventDefault={() => shell.openExternal(this.href)}>link</a> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment