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: 6 months 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 7 years ago)
- Default Branch: master
- Last Pushed: 2020-12-11T17:48:50.000Z (almost 5 years ago)
- Last Synced: 2025-04-23T00:13:41.658Z (6 months 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).**
[](https://www.npmjs.org/package/windows-firefox)
[](https://www.npmjs.org/package/windows-firefox)
[](https://ci.appveyor.com/project/vweevers/windows-firefox)
[](https://david-dm.org/vweevers/windows-firefox)
[](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