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> {
|
async page(): Promise<Page | null> {
|
||||||
if (
|
if (
|
||||||
(this._targetInfo.type === 'page' ||
|
(this._targetInfo.type === 'page' ||
|
||||||
this._targetInfo.type === 'background_page') &&
|
this._targetInfo.type === 'background_page' ||
|
||||||
|
this._targetInfo.type === 'webview') &&
|
||||||
!this._pagePromise
|
!this._pagePromise
|
||||||
) {
|
) {
|
||||||
this._pagePromise = this._sessionFactory().then((client) =>
|
this._pagePromise = this._sessionFactory().then((client) =>
|
||||||
@ -128,14 +129,16 @@ export class Target {
|
|||||||
| 'service_worker'
|
| 'service_worker'
|
||||||
| 'shared_worker'
|
| 'shared_worker'
|
||||||
| 'other'
|
| 'other'
|
||||||
| 'browser' {
|
| 'browser'
|
||||||
|
| 'webview' {
|
||||||
const type = this._targetInfo.type;
|
const type = this._targetInfo.type;
|
||||||
if (
|
if (
|
||||||
type === 'page' ||
|
type === 'page' ||
|
||||||
type === 'background_page' ||
|
type === 'background_page' ||
|
||||||
type === 'service_worker' ||
|
type === 'service_worker' ||
|
||||||
type === 'shared_worker' ||
|
type === 'shared_worker' ||
|
||||||
type === 'browser'
|
type === 'browser' ||
|
||||||
|
type === 'webview'
|
||||||
)
|
)
|
||||||
return type;
|
return type;
|
||||||
return 'other';
|
return 'other';
|
||||||
|
Loading…
Reference in New Issue
Block a user