Wirebrowser Automation Script API Referece
    Preparing search index...

    Interface LeaveHookContext

    interface LeaveHookContext {
        functionSource?: string;
        phase: "leave";
        returnValue: HookReturnValue;
        stackTrace: HookStackFrame[];
        variables: Record<string, any>;
        eval(expression: string): void;
        followReturn(): void;
        log(message: string): void;
        return(value: any): void;
        returnExpr(expression: string): void;
        send(message: any): void;
        setVariable(name: string, value: any): void;
    }

    Hierarchy (View Summary)

    Index

    Properties

    functionSource?: string
    phase: "leave"
    returnValue: HookReturnValue

    Current return value metadata. For non-promise values, value may be populated. For promises, isPromise may be true and objectId may be present.

    stackTrace: HookStackFrame[]
    variables: Record<string, any>

    Local variables.

    Methods

    • Schedules an expression to be evaluated on the current call frame. The result is later exposed as result.evalResult in handleResult.

      Parameters

      • expression: string

      Returns void

    • Requests continuation tracking after this leave point. If the runtime can correlate the continuation, onReturnFollowed will be invoked later.

      Returns void

    • Collects log messages that are displayed on the Node-side once the handler execution is completed.

      Parameters

      • message: string

      Returns void

    • Overrides the return value using a JSON-serializable value.

      Parameters

      • value: any

      Returns void

    • Overrides the return value using a raw expression string.

      Parameters

      • expression: string

      Returns void

    • Sends a structured message to the Node-side result handler. Collected into result.messages.

      Parameters

      • message: any

      Returns void