Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
{
sourceDir: extPath,
// comment if connect to default FF
firefox: PP_FF.executablePath(),
args: [`-juggler=${CDPPort}`]
},
{
// These are non CLI related options for each function.
// You need to specify this one so that your NodeJS application
// can continue running after web-ext is finished.
shouldExitProgram: false
}
)
const browserWSEndpoint = `ws://127.0.0.1:${CDPPort}`
browser = await PP_FF.connect({
browserWSEndpoint
})
} else {
browser = await PP_FF.launch({
headless: false
})
}
const page = await browser.newPage()
if (extPath) await page.waitFor(11000) // await extension to be installed
// throttle since Firefox can't do that, yet
await page.goto(url, {
waitUntil: ['load']
})
const result = await page.evaluate(() => {
{
sourceDir: ext.path,
// comment if connect to default FF
firefox: PP_FF.executablePath(),
args: [`-juggler=${CDPPort}`]
},
{
// These are non CLI related options for each function.
// You need to specify this one so that your NodeJS application
// can continue running after web-ext is finished.
shouldExitProgram: false
}
)
const browserWSEndpoint = `ws://127.0.0.1:${CDPPort}`
browser = await PP_FF.connect({
browserWSEndpoint
})
} else {
browser = await PP_FF.launch({
headless: false
})
}
const page = await browser.newPage()
if (ext.path) await page.waitFor(11000) // await extension to be installed
// throttle since Firefox can't do that, yet
await page.goto(url, {
waitUntil: ['load']
})
const result = await page.evaluate(() => {