import { Frame } from './frame.js';
import { ContentScript } from './inject/index.js';
import { RemoteElement } from './remote-element.js';
import { RemoteObject } from './remote-object.js';
import { CdpRemoteObject, RemoteExpression } from './types.js';
export declare class ExecutionContext {
    readonly frame: Frame;
    readonly executionContextId: string;
    isAlive: boolean;
    protected listeners: {
        onExecutionContextsCleared: () => void;
        onExecutionContextDestroyed: (ev: {
            executionContextId: string;
        }) => void;
    };
    constructor(frame: Frame, executionContextId: string);
    get page(): import("./page.js").Page;
    get target(): import("./target.js").Target;
    evaluate(pageFn: RemoteExpression, ...args: any[]): Promise<RemoteObject>;
    evaluateJson(pageFn: RemoteExpression, ...args: any[]): Promise<any>;
    evaluateElement(pageFn: RemoteExpression, ...args: any[]): Promise<RemoteElement | null>;
    evaluateElementList(pageFn: RemoteExpression, ...args: any[]): Promise<RemoteElement[]>;
    nodeListToElements(nodeList: RemoteObject): Promise<RemoteElement[]>;
    createRemoteObject(cdpRemoteObject: CdpRemoteObject): RemoteObject;
    protected convertArgument(arg: any): CallArgument;
    protected convertException(exceptionDetails: ExceptionDetails): Error;
    protected handleEvaluateError(err: Error): void;
    initContentScripts(scripts: ContentScript[]): Promise<void>;
    protected onExecutionContextsCleared(): void;
    protected onExecutionContextDestroyed(ev: {
        executionContextId: string;
    }): void;
    protected onDestroyed(): void;
}
type CallArgument = {
    value: any;
} | {
    objectId: string;
};
interface ExceptionDetails {
    exception?: {
        description?: string;
        value: string;
    };
    text: string;
    stackTrace?: {
        callFrames: CallFrame[];
    };
}
interface CallFrame {
    functionName: string;
    url: string;
    lineNumber: number;
    columnNumber: number;
}
export {};
//# sourceMappingURL=execution-context.d.ts.map