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

Method append

github-actions/browserstack/set-browserstack-env.js:5199–5213  ·  view source on GitHub ↗
(name, value, filename = void 0)

Source from the content-addressed store, hash-verified

5197 this[kState] = [];
5198 }
5199 append(name, value, filename = void 0) {
5200 webidl.brandCheck(this, _FormData);
5201 const prefix = "FormData.append";
5202 webidl.argumentLengthCheck(arguments, 2, prefix);
5203 if (arguments.length === 3 && !isBlobLike(value)) {
5204 throw new TypeError(
5205 "Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'"
5206 );
5207 }
5208 name = webidl.converters.USVString(name, prefix, "name");
5209 value = isBlobLike(value) ? webidl.converters.Blob(value, prefix, "value", { strict: false }) : webidl.converters.USVString(value, prefix, "value");
5210 filename = arguments.length === 3 ? webidl.converters.USVString(filename, prefix, "filename") : void 0;
5211 const entry = makeEntry(name, value, filename);
5212 this[kState].push(entry);
5213 }
5214 delete(name) {
5215 webidl.brandCheck(this, _FormData);
5216 const prefix = "FormData.delete";

Callers

nothing calls this directly

Calls 3

isBlobLikeFunction · 0.70
makeEntryFunction · 0.70
pushMethod · 0.45

Tested by

no test coverage detected