Skip to content

Commit

Permalink
Create isolate context in each page
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats committed Sep 10, 2018
1 parent d16798c commit ec8137a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/browserless.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,17 @@ module.exports = launchOpts => {
'--no-pings',
'--no-sandbox',
'--no-zygote',
'--prerender-from-omnibox=disabled',
'--single-process'
'--prerender-from-omnibox=disabled'
],
...launchOpts
})

const newPage = () =>
Promise.resolve(browser).then(browser => browser.newPage())
Promise.resolve(browser).then(async browser => {
const context = await browser.createIncognitoBrowserContext()
const page = await context.newPage()
return page
})

const goto = async (
page,
Expand Down

0 comments on commit ec8137a

Please sign in to comment.