mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
feat: expose frame's execution contexts (#3048)
This patch exposes frame's execution contexts, making it possible to debug extension's content scripts. This is a resurrected #2812.
This commit is contained in:
@@ -30,9 +30,25 @@ class ExecutionContext {
|
||||
this._client = client;
|
||||
this._frame = frame;
|
||||
this._contextId = contextPayload.id;
|
||||
this._isDefault = contextPayload.auxData ? !!contextPayload.auxData['isDefault'] : false;
|
||||
this._name = contextPayload.name;
|
||||
this._objectHandleFactory = objectHandleFactory;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {string}
|
||||
*/
|
||||
name() {
|
||||
return this._name;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {boolean}
|
||||
*/
|
||||
isDefault() {
|
||||
return this._isDefault;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {?Puppeteer.Frame}
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user