diff --git a/src/Target.ts b/src/Target.ts index 9239b760..7c705880 100644 --- a/src/Target.ts +++ b/src/Target.ts @@ -82,7 +82,8 @@ export class Target { async page(): Promise { if ( (this._targetInfo.type === 'page' || - this._targetInfo.type === 'background_page') && + this._targetInfo.type === 'background_page' || + this._targetInfo.type === 'webview') && !this._pagePromise ) { this._pagePromise = this._sessionFactory().then((client) => @@ -128,14 +129,16 @@ export class Target { | 'service_worker' | 'shared_worker' | 'other' - | 'browser' { + | 'browser' + | 'webview' { const type = this._targetInfo.type; if ( type === 'page' || type === 'background_page' || type === 'service_worker' || type === 'shared_worker' || - type === 'browser' + type === 'browser' || + type === 'webview' ) return type; return 'other';