make it a little more specific
This commit is contained in:
parent
9b6ce75f5f
commit
118cb77ba9
|
|
@ -23,7 +23,7 @@ import type * as frames from './frames';
|
|||
import type { InjectedScript, HitTargetInterceptionResult, ElementState } from './injected/injectedScript';
|
||||
import type { CallMetadata } from './instrumentation';
|
||||
import * as js from './javascript';
|
||||
import type { Page } from './page';
|
||||
import { Page } from './page';
|
||||
import type { Progress } from './progress';
|
||||
import { ProgressController } from './progress';
|
||||
import type * as types from './types';
|
||||
|
|
@ -56,6 +56,8 @@ export class FrameExecutionContext extends js.ExecutionContext {
|
|||
super(frame, delegate, world || 'content-script');
|
||||
this.frame = frame;
|
||||
this.world = world;
|
||||
|
||||
this.frame._page.on(Page.Events.Crash, () => this.contextDestroyed('Page crashed'));
|
||||
}
|
||||
|
||||
override adoptIfNeeded(handle: js.JSHandle): Promise<js.JSHandle> | null {
|
||||
|
|
|
|||
|
|
@ -495,8 +495,6 @@ export class Frame extends SdkObject {
|
|||
this._currentDocument = { documentId: undefined, request: undefined };
|
||||
this.selectors = new FrameSelectors(this);
|
||||
|
||||
this._page.on(Page.Events.Crash, () => this._onDetached());
|
||||
|
||||
this._contextData.set('main', { contextPromise: new ManualPromise(), context: null });
|
||||
this._contextData.set('utility', { contextPromise: new ManualPromise(), context: null });
|
||||
this._setContext('main', null);
|
||||
|
|
|
|||
Loading…
Reference in a new issue