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

playwright-core

Package Overview
Dependencies
Maintainers
1
Versions
4705
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

playwright-core - npm Package Compare versions

Comparing version 0.11.1-next.1583858111401 to 0.11.1-next.1583863091474

2

lib/chromium/crPage.d.ts

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

private _contextIdToContext;
private _isolatedWorlds;
private _eventListeners;

@@ -54,3 +53,2 @@ rawMouse: RawMouseImpl;

_onFrameRequestedNavigation(payload: Protocol.Page.frameRequestedNavigationPayload): void;
_ensureIsolatedWorld(name: string): Promise<void>;
_onFrameNavigatedWithinDocument(frameId: string, url: string): void;

@@ -57,0 +55,0 @@ _onFrameDetached(frameId: string): void;

28

lib/chromium/crPage.js

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

this._contextIdToContext = new Map();
this._isolatedWorlds = new Set();
this._eventListeners = [];

@@ -79,6 +78,15 @@ this._client = client;

];
this._page.frames().map(frame => this._client.send('Page.createIsolatedWorld', {
frameId: frame._id,
grantUniveralAccess: true,
worldName: UTILITY_WORLD_NAME,
}).catch(helper_1.debugError)); // frames might be removed before we send this.
}),
this._client.send('Log.enable', {}),
this._client.send('Page.setLifecycleEventsEnabled', { enabled: true }),
this._client.send('Runtime.enable', {}).then(() => this._ensureIsolatedWorld(UTILITY_WORLD_NAME)),
this._client.send('Runtime.enable', {}),
this._client.send('Page.addScriptToEvaluateOnNewDocument', {
source: `//# sourceURL=${crExecutionContext_1.EVALUATION_SCRIPT_URL}`,
worldName: UTILITY_WORLD_NAME,
}),
this._networkManager.initialize(),

@@ -158,16 +166,2 @@ this._client.send('Target.setAutoAttach', { autoAttach: true, waitForDebuggerOnStart: true, flatten: true }),

}
async _ensureIsolatedWorld(name) {
if (this._isolatedWorlds.has(name))
return;
this._isolatedWorlds.add(name);
await this._client.send('Page.addScriptToEvaluateOnNewDocument', {
source: `//# sourceURL=${crExecutionContext_1.EVALUATION_SCRIPT_URL}`,
worldName: name,
});
await Promise.all(this._page.frames().map(frame => this._client.send('Page.createIsolatedWorld', {
frameId: frame._id,
grantUniveralAccess: true,
worldName: name,
}).catch(helper_1.debugError))); // frames might be removed before we send this
}
_onFrameNavigatedWithinDocument(frameId, url) {

@@ -183,4 +177,2 @@ this._page._frameManager.frameCommittedSameDocumentNavigation(frameId, url);

return;
if (contextPayload.auxData && contextPayload.auxData.type === 'isolated')
this._isolatedWorlds.add(contextPayload.name);
const delegate = new crExecutionContext_1.CRExecutionContext(this._client, contextPayload);

@@ -187,0 +179,0 @@ const context = new dom.FrameExecutionContext(delegate, frame);

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

await Promise.all([
// TODO: we should get rid of this call to resolve before any early events arrive, e.g. dialogs.
this._session.send('Page.addScriptToEvaluateOnNewDocument', {

@@ -76,0 +77,0 @@ script: '',

{
"name": "playwright-core",
"version": "0.11.1-next.1583858111401",
"version": "0.11.1-next.1583863091474",
"description": "A high-level API to automate web browsers",

@@ -5,0 +5,0 @@ "repository": "github:Microsoft/playwright",

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

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