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; Copy
const net = createMockLoopbackNetwork(['https://api.example.org']);net.open('https://evil.example.net').ok === false;
Readonly
Granted origins the network accepts.
Sockets opened so far, including closed ones.
Open a connection to url if its origin is granted.
url
In-memory stand-in for the browser network under a NAP-CONNECT CSP: only granted origins can be opened; everything else is blocked.
Example