MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / createPageTarget

Function createPageTarget

scripts/e2e-webrtc-reliability.mjs:957–968  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

955}
956
957async function createPageTarget(url) {
958 const response = await fetch(
959 `http://127.0.0.1:${debugPort}/json/new?${encodeURIComponent(url)}`,
960 { method: "PUT" },
961 );
962 if (!response.ok) {
963 throw new Error(
964 `Failed to create Chrome target: ${response.status} ${await response.text()}`,
965 );
966 }
967 return response.json();
968}
969
970async function collectDirectWebRtcStats(cdp) {
971 return evaluate(

Callers 1

Calls 3

fetchFunction · 0.85
jsonMethod · 0.80
textMethod · 0.65

Tested by

no test coverage detected