(name, value, filename = undefined)
| 28 | } |
| 29 | |
| 30 | append (name, value, filename = undefined) { |
| 31 | webidl.brandCheck(this, FormData) |
| 32 | |
| 33 | const prefix = 'FormData.append' |
| 34 | webidl.argumentLengthCheck(arguments, 2, prefix) |
| 35 | |
| 36 | name = webidl.converters.USVString(name) |
| 37 | |
| 38 | if (arguments.length === 3 || webidl.is.Blob(value)) { |
| 39 | value = webidl.converters.Blob(value, prefix, 'value') |
| 40 | |
| 41 | if (filename !== undefined) { |
| 42 | filename = webidl.converters.USVString(filename) |
| 43 | } |
| 44 | } else { |
| 45 | value = webidl.converters.USVString(value) |
| 46 | } |
| 47 | |
| 48 | // 1. Let value be value if given; otherwise blobValue. |
| 49 | |
| 50 | // 2. Let entry be the result of creating an entry with |
| 51 | // name, value, and filename if given. |
| 52 | const entry = makeEntry(name, value, filename) |
| 53 | |
| 54 | // 3. Append entry to this’s entry list. |
| 55 | this.#state.push(entry) |
| 56 | } |
| 57 | |
| 58 | delete (name) { |
| 59 | webidl.brandCheck(this, FormData) |
no test coverage detected