From a2ba6f0abbba27fb0bdd14735b96f9d5a1e0c667 Mon Sep 17 00:00:00 2001 From: musou1500 Date: Fri, 29 May 2020 17:46:44 +0900 Subject: [PATCH] feat: recognize webviews as regular pages (#5905) --- src/Target.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Target.ts b/src/Target.ts index 9239b760b56..7c705880078 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';