Wirebrowser Automation Script API Referece
    Preparing search index...

    Interface LiveHookDefinition

    Definition of a LiveHook persisted in the project. Conventions:

    • file is the script URL used by Debugger.setBreakpointByUrl
    • line/col are 1-based (human friendly)
    • when/returnExpr are expressions evaluated in the call frame
    interface LiveHookDefinition {
        code?: string;
        col: number;
        condition?: string;
        file: string;
        hookType: LiveHookType;
        line: number;
        returnExpr?: string;
    }
    Index

    Properties

    code?: string

    For hookType === "inject": JS code executed in the call frame.

    col: number

    1-based column number.

    condition?: string

    Optional guard expression evaluated in the call frame. If falsy, the hook is skipped.

    file: string

    Script URL (e.g. https://site.com/bundle.js).

    hookType: LiveHookType

    Hook behavior, "inject" or "return".

    line: number

    1-based line number.

    returnExpr?: string

    For hookType === "return": Expression evaluated in the call frame; its result is used for setReturnValue. Important: it can be applied to sync functions only. Example: '"ok"', '({a:1})', 'someLocalVar'