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:
Andrey Lushnikov
2018-08-09 14:57:08 -07:00
committed by GitHub
parent b84404c94e
commit 231a2be971
9 changed files with 158 additions and 27 deletions

View File

@@ -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}
*/