browser-window
v0.4.0
Published
A helpful `BrowserWindow` wrapper.
Downloads
21
Readme
browser-window
A helpful
BrowserWindow
wrapper.
// Initialize module
const browser = require('browser-window')()
app.on('ready', () => {
// Create browser window
const window = browser({
title: 'Hello world',
width: 100,
height: 100
})
// Load data
window.load('<p>Hi, how are you?</p>', {type: 'text/html'})
// Create children windows
const child = window.subwindow({title: 'Foo bar'})
// Send IPC messages
child.send('some-message', 1, 2, 3)
})
Installation
$ npm install --save browser-window
Documentation
License
MIT © Jamen Marz