window-popup
v1.1.0
Published
Open window popup centered in the current browser window
Downloads
853
Readme
window-popup
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