Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vweevers/windows-firefox
Launch a fresh Firefox on Windows.
https://github.com/vweevers/windows-firefox
browsers firefox nodejs testing-tools
Last synced: 21 days ago
JSON representation
Launch a fresh Firefox on Windows.
- Host: GitHub
- URL: https://github.com/vweevers/windows-firefox
- Owner: vweevers
- License: mit
- Created: 2018-05-20T14:55:50.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-12-11T17:48:50.000Z (about 4 years ago)
- Last Synced: 2025-01-09T07:34:27.097Z (21 days ago)
- Topics: browsers, firefox, nodejs, testing-tools
- Language: JavaScript
- Homepage:
- Size: 2.93 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# windows-firefox
**Launch a fresh Firefox on Windows. See also [`osx-firefox`](https://github.com/juliangruber/osx-firefox) and [`linux-firefox`](https://github.com/juliangruber/linux-firefox).**
[![npm status](http://img.shields.io/npm/v/windows-firefox.svg?style=flat-square)](https://www.npmjs.org/package/windows-firefox)
[![node](https://img.shields.io/node/v/windows-firefox.svg?style=flat-square)](https://www.npmjs.org/package/windows-firefox)
[![AppVeyor build status](https://img.shields.io/appveyor/ci/vweevers/windows-firefox.svg?style=flat-square&label=appveyor)](https://ci.appveyor.com/project/vweevers/windows-firefox)
[![Dependency status](https://img.shields.io/david/vweevers/windows-firefox.svg?style=flat-square)](https://david-dm.org/vweevers/windows-firefox)
[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg?style=flat-square)](https://standardjs.com)## Example
```js
const firefox = require('windows-firefox')firefox({ uri: 'https://github.com/' }, (err, cp) => {
if (err) throw err
cp.on('error', console.error)
})
```## API
### `firefox([options, ]callback)`
The `callback` receives an error if any, a child process and a [metadata object](https://github.com/vweevers/win-detect-browsers/#api).
Options:
- `uri` (string): URL to open
- `channel` (string): filter installed versions by [release channel](https://github.com/vweevers/win-detect-browsers/#api), e.g. `nightly`
- `version` (string): filter versions by partial (e.g. `62`) or exact version. If neither `channel` nor `version` is specified, the first found version will be launched.
- `proxy`, `noProxy` and `prefs`: passed to [`create-firefox-profile`](https://github.com/vweevers/create-firefox-profile)
- `headless` (boolean): Run Firefox in [headless mode](https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Headless_mode). Available since Firefox 56.
- `devtools` (boolean): Start with [Developer Tools](https://developer.mozilla.org/en-US/docs/Tools) opened.
- `background`: Don't foreground the browser.## Install
With [npm](https://npmjs.org) do:
```
npm install windows-firefox
```Firefox needs to be installed on your system as well.
## License
[MIT](http://opensource.org/licenses/MIT) © Vincent Weevers