0.1.1 • Published 6 years ago
nanochrome v0.1.1
nanochrome
Launch a Chrome Browser as a nanoprocess that leverages chrome-launcher.
Installation
$ npm install nanochromeStatus
Stable
Usage
const nanochrome = require('nanochrome')
const chrome = nanochrome('https://example.com')
chrome.open((err) => {
// chrome browser window opened
})API
const chrome = nanochrome(uri[, options])
Creates a new Chrome (nanoprocess) instance from uri
with optional options that are passed directly to
chrome.launch(). options can also be:
{
app: false, // set to `true` to launch URI in application mode (--app=)
headless: false, // set `true` to run headless (--headless)
}See Chrome Flags for
Tools for a complete list of useful flags that can be passed in the opts.chromeFlags array.
chrome.open([callback])
Opens the Google Chrome browser calling callback(err) upon success or
error.
chrome.close([callback])
Closes the Google Chrome browser calling callback(err) upon success or
error.
See Also
License
MIT