Skip to content

Commit

Permalink
Allow passthrough of puppeteer options
Browse files Browse the repository at this point in the history
  • Loading branch information
mmoss committed Jun 14, 2020
1 parent 59f09e5 commit 0d7f0a0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@

const defiant = {
init: async () => {
init: async (puppeteerOpts) => {
const puppeteer = require('puppeteer')
const fs = require('fs')
const script = fs.readFileSync(__dirname +'/dist/defiant.min.js', 'utf8')

return new Promise((resolve, reject) => {
puppeteer
.launch()
.launch(puppeteerOpts)
.then(async browser => {
const page = await browser.newPage()
page.on('console', msg => console.log(msg.text()))
Expand Down

0 comments on commit 0d7f0a0

Please sign in to comment.