feat: recognize webviews as regular pages (#5905)
This commit is contained in:
parent
8e8a9df3dd
commit
a2ba6f0abb
@ -82,7 +82,8 @@ export class Target {
|
||||
async page(): Promise<Page | null> {
|
||||
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';
|
||||
|
Loading…
Reference in New Issue
Block a user