Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

website-popup

2.0.0 • Public • Published

website-popup Build Status

Open a website in a popup (OS X)

Install

$ npm install --save website-popup

Usage

const websitePopup = require('website-popup');
const url = 'https://sindresorhus.com';
 
websitePopup(url, {width: 600, height: 400}).then(() => {
    // closed
});
 
const close = websitePopup(url);
setTimeout(close, 2000);

API

websitePopup(url, [options])

Returns a Promise-like method to close the popup.

url

Type: string

URL to open.

options

width

Type: number
Default: 1280

Width of the popup.

height

Type: number
Default: 1024

Height of the popup.

Related

License

MIT © Sindre Sorhus

install

npm i website-popup

Downloadsweekly downloads

6

version

2.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability