electron-open-link-in-browser
Open a link in browser for Electron and browser.
Install
$ npm install --save electron-open-link-in-browser
Usage
<script type="text/javascript" src="build/electron-open-link-in-browser.js"></script>
<a
href="https://github.com/lyrictenor/nwjs-emoji-app"
onClick="electronOpenLinkInBrowser();"
>
github.com/lyrictenor/nwjs-emoji-app
</a>
<button
type="button"
onclick="electronOpenLinkInBrowser('http://example.com');"
>
Example.com
</button>
React.js + JSX + Browserify/Webpack
var electronOpenLinkInBrowser = require("electron-open-link-in-browser");
<a
href="https://github.com/lyrictenor/nwjs-emoji-app"
onClick={electronOpenLinkInBrowser.bind(this)}
>
github.com/lyrictenor/nwjs-emoji-app
</a>
<button
type="button"
onClick={electronOpenLinkInBrowser.bind(this, "http://example.com")}
>
Example.com
</button>
API
electronOpenLinkInBrowser([url,] event)
Jump to the href property.
url
Optional
Type: string
Jump to url.
Changelog
changelog.md.
License
MIT © sanemat