Skip to content

lyrictenor/nwjs-open-link-in-browser

Repository files navigation

nwjs-open-link-in-browser

NPM version Travis-CI Status Appveyor Status Daviddm Status

Open a link in browser for NW.js and browser.

NW.js app to browser

NW.js to browser

####browser to browser

browser to browser

Install

$ npm install --save nwjs-open-link-in-browser

Usage

<script type="text/javascript" src="build/nwjs-open-link-in-browser.js"></script>
<a
  href="https://github.com/lyrictenor/nwjs-emoji-app"
  onClick="nwjsOpenLinkInBrowser();"
  >
  github.com/lyrictenor/nwjs-emoji-app
</a>

<button
  type="button"
  onclick="nwjsOpenLinkInBrowser('http://example.com');"
  >
  Example.com
</button>

React.js + JSX + Browserify/Webpack

var nwjsOpenLinkInBrowser = require("nwjs-open-link-in-browser");

<a
  href="https://github.com/lyrictenor/nwjs-emoji-app"
  onClick={nwjsOpenLinkInBrowser.bind(this)}
  >
  github.com/lyrictenor/nwjs-emoji-app
</a>

<button
  type="button"
  onClick={nwjsOpenLinkInBrowser.bind(this, "http://example.com")}
  >
  Example.com
</button>

API

nwjsOpenLinkInBrowser([url,] event)

Jump to the href property.

url

Optional

Type: string

Jump to url.

Changelog

changelog.md.

License

MIT © sanemat

About

Open a link in browser for NW.js and browser.

Resources

License

Stars

Watchers

Forks

Packages

No packages published