mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
fix(page): use secondary DOMWorld to drive page.select() (#3809)
This patch starts creating secondary DOMWorld for every connected page and switches `page.select()` to run inside the secondary world. Fix #3327.
This commit is contained in:
@@ -24,20 +24,19 @@ class ExecutionContext {
|
||||
/**
|
||||
* @param {!Puppeteer.CDPSession} client
|
||||
* @param {!Protocol.Runtime.ExecutionContextDescription} contextPayload
|
||||
* @param {?Puppeteer.Frame} frame
|
||||
* @param {?Puppeteer.DOMWorld} world
|
||||
*/
|
||||
constructor(client, contextPayload, frame) {
|
||||
constructor(client, contextPayload, world) {
|
||||
this._client = client;
|
||||
this._frame = frame;
|
||||
this._world = world;
|
||||
this._contextId = contextPayload.id;
|
||||
this._isDefault = contextPayload.auxData ? !!contextPayload.auxData['isDefault'] : false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {?Puppeteer.Frame}
|
||||
*/
|
||||
frame() {
|
||||
return this._frame;
|
||||
return this._world ? this._world.frame() : null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user