(name, value, filename = void 0)
| 51981 | return this[kState].filter((entry) => entry.name === name).map((entry) => entry.value); |
| 51982 | } |
| 51983 | has(name) { |
| 51984 | webidl.brandCheck(this, _FormData); |
| 51985 | webidl.argumentLengthCheck(arguments, 1, { header: "FormData.has" }); |
| 51986 | name = webidl.converters.USVString(name); |
| 51987 | return this[kState].findIndex((entry) => entry.name === name) !== -1; |
| 51988 | } |
| 51989 | set(name, value, filename = void 0) { |
| 51990 | webidl.brandCheck(this, _FormData); |
| 51991 | webidl.argumentLengthCheck(arguments, 2, { header: "FormData.set" }); |
| 51992 | if (arguments.length === 3 && !isBlobLike3(value)) { |
| 51993 | throw new TypeError( |
| 51994 | "Failed to execute 'set' on 'FormData': parameter 2 is not of type 'Blob'" |
| 51995 | ); |
| 51996 | } |
| 51997 | name = webidl.converters.USVString(name); |
| 51998 | value = isBlobLike3(value) ? webidl.converters.Blob(value, { strict: false }) : webidl.converters.USVString(value); |
| 51999 | filename = arguments.length === 3 ? toUSVString(filename) : void 0; |
| 52000 | const entry = makeEntry(name, value, filename); |
| 52001 | const idx = this[kState].findIndex((entry2) => entry2.name === name); |
| 52002 | if (idx !== -1) { |
| 52003 | this[kState] = [ |
| 52004 | ...this[kState].slice(0, idx), |
| 52005 | entry, |
| 52006 | ...this[kState].slice(idx + 1).filter((entry2) => entry2.name !== name) |
| 52007 | ]; |
| 52008 | } else { |
nothing calls this directly
no test coverage detected