🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

patchright-core

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

patchright-core - npm Package Compare versions

Comparing version

to
1.52.5

6

lib/client/frame.js

@@ -195,5 +195,5 @@ "use strict";

}
async $$eval(selector, pageFunction, arg) {
(0, import_jsHandle.assertMaxArguments)(arguments.length, 3);
const result = await this._channel.evalOnSelectorAll({ selector, expression: String(pageFunction), isFunction: typeof pageFunction === "function", arg: (0, import_jsHandle.serializeArgument)(arg) });
async $$eval(selector, pageFunction, arg, isolatedContext = true) {
(0, import_jsHandle.assertMaxArguments)(arguments.length, 4);
const result = await this._channel.evalOnSelectorAll({ selector, expression: String(pageFunction), isFunction: typeof pageFunction === "function", arg: (0, import_jsHandle.serializeArgument)(arg), isolatedContext });
return (0, import_jsHandle.parseResult)(result.value);

@@ -200,0 +200,0 @@ }

@@ -115,4 +115,4 @@ "use strict";

}
async evaluateAll(pageFunction, arg) {
return await this._frame.$$eval(this._selector, pageFunction, arg);
async evaluateAll(pageFunction, arg, isolatedContext = true) {
return await this._frame.$$eval(this._selector, pageFunction, arg, isolatedContext);
}

@@ -119,0 +119,0 @@ async evaluateHandle(pageFunction, arg, options, isolatedContext = true) {

@@ -521,7 +521,7 @@ "use strict";

this._sessionManager._alreadyTrackedNetworkIds.add(this._networkId);
this._session.send("Fetch.continueRequest", { requestId: this._interceptionId, interceptResponse: true });
this._session._sendMayFail("Fetch.continueRequest", { requestId: this._interceptionId, interceptResponse: true });
});
} else {
await catchDisallowedErrors(async () => {
await this._session.send("Fetch.continueRequest", this._alreadyContinuedParams);
await this._session._sendMayFail("Fetch.continueRequest", this._alreadyContinuedParams);
});

@@ -528,0 +528,0 @@ }

@@ -498,3 +498,2 @@ "use strict";

const response = await this._client.send("Page.navigate", { url, referrer, frameId: frame._id, referrerPolicy: "unsafeUrl" });
this._client._sendMayFail("Page.waitForDebugger");
if (response.errorText)

@@ -501,0 +500,0 @@ throw new frames.NavigationAbortedError(response.loaderId, `${response.errorText} at ${url}`);

@@ -97,3 +97,3 @@ "use strict";

async evalOnSelectorAll(params, metadata) {
return { value: (0, import_jsHandleDispatcher.serializeResult)(await this._frame.evalOnSelectorAll(params.selector, params.expression, params.isFunction, (0, import_jsHandleDispatcher.parseArgument)(params.arg))) };
return { value: (0, import_jsHandleDispatcher.serializeResult)(await this._frame.evalOnSelectorAll(params.selector, params.expression, params.isFunction, (0, import_jsHandleDispatcher.parseArgument)(params.arg), null, params.isolatedContext)) };
}

@@ -100,0 +100,0 @@ async querySelector(params, metadata) {

@@ -49,4 +49,4 @@ "use strict";

}
async queryArrayInMainWorld(selector, scope) {
const resolved = await this.resolveInjectedForSelector(selector, { mainWorld: true }, scope);
async queryArrayInMainWorld(selector, scope, isolatedContext) {
const resolved = await this.resolveInjectedForSelector(selector, { mainWorld: !isolatedContext }, scope);
if (!resolved)

@@ -53,0 +53,0 @@ throw new Error(`Failed to find frame for selector "${selector}"`);

@@ -137,3 +137,3 @@ "use strict";

let context = this._context;
if (this._context.constructor.name === "FrameExecutionContext") {
if (context.constructor.name === "FrameExecutionContext") {
const frame = this._context.frame;

@@ -140,0 +140,0 @@ if (frame) {

@@ -666,3 +666,3 @@ "use strict";

let context = await this._executionContextPromise;
if (this._context.constructor.name === "FrameExecutionContext") {
if (context.constructor.name === "FrameExecutionContext") {
const frame = this._context.frame;

@@ -669,0 +669,0 @@ if (frame) {

{
"name": "patchright-core",
"version": "1.52.4",
"version": "1.52.5",
"description": "A high-level API to automate web browsers",

@@ -5,0 +5,0 @@ "repository": {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display