MCPcopy Create free account
hub / github.com/angular/dev-infra / clone

Method clone

github-actions/browserstack/set-browserstack-env.js:12793–12807  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

12791 return;
12792 }
12793 if (body !== null) {
12794 body = webidl.converters.BodyInit(body);
12795 }
12796 init = webidl.converters.ResponseInit(init);
12797 this[kState] = makeResponse({});
12798 this[kHeaders] = new Headers2(kConstruct);
12799 setHeadersGuard(this[kHeaders], "response");
12800 setHeadersList(this[kHeaders], this[kState].headersList);
12801 let bodyWithType = null;
12802 if (body != null) {
12803 const [extractedBody, type] = extractBody(body);
12804 bodyWithType = { body: extractedBody, type };
12805 }
12806 initializeResponse(this, init, bodyWithType);
12807 }
12808 // Returns response’s type, e.g., "cors".
12809 get type() {
12810 webidl.brandCheck(this, _Response);

Callers

nothing calls this directly

Calls 4

bodyUnusableFunction · 0.70
cloneResponseFunction · 0.70
fromInnerResponseFunction · 0.70
registerMethod · 0.45

Tested by

no test coverage detected