Documentation
    Preparing search index...

    Interface MockLoopbackNetwork

    In-memory stand-in for the browser network under a NAP-CONNECT CSP: only granted origins can be opened; everything else is blocked.

    const net = createMockLoopbackNetwork(['https://api.example.org']);
    net.open('https://evil.example.net').ok === false;
    interface MockLoopbackNetwork {
        origins: readonly string[];
        sockets: readonly LoopbackSocket[];
        open(url: string): LoopbackOpenResult;
    }
    Index

    Properties

    Methods

    Properties

    origins: readonly string[]

    Granted origins the network accepts.

    sockets: readonly LoopbackSocket[]

    Sockets opened so far, including closed ones.

    Methods