Magpie HTML - v0.1.3
    Preparing search index...

    Interface SwoopInit

    interface SwoopInit {
        engine?: "vm";
        pluck?: PluckInit;
        executeScripts?: boolean;
        timeout?: number;
        waitStrategy?: SwoopWaitStrategy;
        idleTime?: number;
        pollInterval?: number;
        maxScripts?: number;
        forwardConsole?: boolean;
        permissiveShims?: boolean;
        debugFetch?: boolean;
        debugProbes?: boolean;
    }
    Index

    Properties

    engine?: "vm"

    Execution engine used for running third-party scripts.

    • vm (default): practical, supports fetch by reusing host globals
    'vm'
    
    pluck?: PluckInit

    Pluck options used for the initial HTML request and external script fetching.

    executeScripts?: boolean

    Execute inline and external scripts found in the HTML.

    true
    
    timeout?: number

    Maximum time to wait for the page to "settle" before taking a snapshot.

    3000
    
    waitStrategy?: SwoopWaitStrategy

    Which waiting strategy to use.

    • timeout: sleep for timeout and snapshot
    • networkidle: wait until no tracked fetches are pending for idleTime
    'networkidle'
    
    idleTime?: number

    Required quiet period (ms) for networkidle.

    250
    
    pollInterval?: number

    Poll interval (ms) for networkidle.

    25
    
    maxScripts?: number

    How many scripts to load/execute at most.

    64
    
    forwardConsole?: boolean

    If true, forward console output from the isolated realm to the host console.

    false
    
    permissiveShims?: boolean

    If true, installs permissive Proxy-based stubs for common missing browser APIs.

    This may hide some failures (by turning hard crashes into no-ops), but improves compatibility for a best-effort snapshotter.

    true
    
    debugFetch?: boolean

    Record all sandbox fetch() calls into the captured console output.

    false
    
    debugProbes?: boolean

    Enable additional sandbox probes to help iterative shim development.

    Collects lightweight runtime stats (DOM ops/mutations, app-root growth, etc.) and emits them via captured console.

    false