Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

puppeteer

Package Overview
Dependencies
Maintainers
3
Versions
918
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

puppeteer - npm Package Compare versions

Comparing version 1.0.0-next.1515568144024 to 1.0.0-next.1515618391320

5

lib/NavigatorWatcher.js

@@ -24,5 +24,6 @@ /**

* @param {!Puppeteer.Frame} frame
* @param {number} timeout
* @param {!Object=} options
*/
constructor(frameManager, frame, options = {}) {
constructor(frameManager, frame, timeout, options = {}) {
console.assert(options.networkIdleTimeout === undefined, 'ERROR: networkIdleTimeout option is no longer supported.');

@@ -45,3 +46,3 @@ console.assert(options.networkIdleInflight === undefined, 'ERROR: networkIdleInflight option is no longer supported.');

this._initialLoaderId = frame._loaderId;
this._timeout = typeof options.timeout === 'number' ? options.timeout : 30000;
this._timeout = timeout;
this._eventListeners = [

@@ -48,0 +49,0 @@ helper.addEventListener(this._frameManager, FrameManager.Events.LifecycleEvent, this._checkLifecycleComplete.bind(this)),

18

lib/Page.js

@@ -82,2 +82,3 @@ /**

this._coverage = new Coverage(client);
this._defaultNavigationTimeout = 30000;

@@ -175,2 +176,9 @@ this._screenshotTaskQueue = screenshotTaskQueue;

/**
* @param {number} timeout
*/
setDefaultNavigationTimeout(timeout) {
this._defaultNavigationTimeout = timeout;
}
/**
* @param {!Object} event

@@ -476,3 +484,3 @@ */

*/
async goto(url, options) {
async goto(url, options = {}) {
const referrer = this._networkManager.extraHTTPHeaders()['referer'];

@@ -486,3 +494,4 @@

const mainFrame = this._frameManager.mainFrame();
const watcher = new NavigatorWatcher(this._frameManager, mainFrame, options);
const timeout = typeof options.timeout === 'number' ? options.timeout : this._defaultNavigationTimeout;
const watcher = new NavigatorWatcher(this._frameManager, mainFrame, timeout, options);
const navigationPromise = watcher.navigationPromise();

@@ -534,5 +543,6 @@ let error = await Promise.race([

*/
async waitForNavigation(options) {
async waitForNavigation(options = {}) {
const mainFrame = this._frameManager.mainFrame();
const watcher = new NavigatorWatcher(this._frameManager, mainFrame, options);
const timeout = typeof options.timeout === 'number' ? options.timeout : this._defaultNavigationTimeout;
const watcher = new NavigatorWatcher(this._frameManager, mainFrame, timeout, options);

@@ -539,0 +549,0 @@ const responses = new Map();

{
"name": "puppeteer",
"version": "1.0.0-next.1515568144024",
"version": "1.0.0-next.1515618391320",
"description": "A high-level API to control headless Chrome over the DevTools Protocol",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc