window-popup

1.1.0 • Public • Published

window-popup Build Status

Open window popup centered in the current browser window

Install

$ npm install --save window-popup

Usage

node.js

var popup = require('window-popup').windowPopup;
popup(500, 500, 'http://www.google.sk');
popup(500, 500, 'http://www.google.com', 'Google');
popup(500, 500, 'http://www.google.com', 'Google', gui.Window.get()); //node webkit custom window object

Browser with jQuery

$.windowPopup(500, 500, 'http://www.google.sk');
 

Browser

window.windowPopup(500, 500, 'http://www.google.sk');
 

API

width (required)

Type: Number
Default: undefined

Width of the popup.

height (required)

Type: Number
Default: undefined

Height of the popup.

url (required)

Type: String
Default: undefined

Url to open in popup.

title

Type: String
Default: ``

Title of the popup.

window

Type: object
Default: window

Custom window object. Usefull in environments like node webkit.

License

MIT © Daniel Husar

Readme

Keywords

none

Package Sidebar

Install

npm i window-popup

Weekly Downloads

179

Version

1.1.0

License

MIT

Last publish

Collaborators

  • efrafa