import { TypedEventEmitter } from '@ulixee/commons/lib/eventUtils'; import IRegisteredEventListener from '@ulixee/commons/interfaces/IRegisteredEventListener'; import { IFrame, IFrameManagerEvents } from '@unblocked-web/specifications/agent/browser/IFrame'; import { IBoundLog } from '@ulixee/commons/interfaces/ILog'; import IResourceMeta from '@unblocked-web/specifications/agent/net/IResourceMeta'; import DevtoolsSession from './DevtoolsSession'; import Frame from './Frame'; import Page from './Page'; export declare const DEFAULT_PAGE = "about:blank"; export declare const ISOLATED_WORLD = "__agent_world__"; export default class FramesManager extends TypedEventEmitter { readonly framesById: Map; readonly framesByFrameId: Map; readonly page: Page; readonly pendingNewDocumentScripts: { script: string; isolated: boolean; }[]; mainFrameId: string; get main(): Frame; get activeFrames(): Frame[]; protected readonly logger: IBoundLog; private onFrameCreatedResourceEventsByFrameId; private get resources(); private attachedFrameIds; private activeContextIds; private readonly events; private readonly devtoolsSession; private readonly networkManager; private readonly domStorageTracker; private isReady; constructor(page: Page, devtoolsSession: DevtoolsSession); initialize(): Promise; close(error?: Error): void; addPageCallback(name: string, onCallback: (payload: string, frame: IFrame) => any, isolateFromWebPageEnvironment?: boolean): Promise; addNewDocumentScript(script: string, installInIsolatedScope?: boolean): Promise<{ identifier: string; }>; checkForResolvedNavigation(browserRequestId: string, resource: IResourceMeta, error?: Error): boolean; frameWithPendingNavigation(browserRequestId: string, requestedUrl: string, finalUrl: string): Frame | null; clearChildFrames(): void; getSecurityOrigins(): { origin: string; frameId: string; }[]; waitForFrame(frameDetails: { frameId: string; loaderId?: string; }, url: string, isInitiatingNavigation?: boolean): Promise; getFrameForExecutionContext(executionContextId: number): Frame | undefined; private onExecutionContextDestroyed; private onExecutionContextsCleared; private onExecutionContextCreated; private onFrameNavigated; private onFrameStoppedLoading; private onFrameRequestedNavigation; private onFrameNavigatedWithinDocument; private onFrameDetached; private onFrameAttached; private onLifecycleEvent; private onDomPaintEvent; private recurseFrameTree; private recordFrame; private replayMissedResourceEventsAfterFrameAttached; private getFrameForEventOrQueueForReady; private onResourceWillBeRequested; private onResourceWasRequested; private onResourceLoaded; private onResourceFailed; private onNavigationResourceResponse; }