| 5237 | return exports2.createDefaultIterator(globalObject, this, "key+value"); |
| 5238 | } |
| 5239 | forEach(callback) { |
| 5240 | if (!exports2.is(this)) { |
| 5241 | throw new globalObject.TypeError( |
| 5242 | "'forEach' called on an object that is not a valid instance of URLSearchParams." |
| 5243 | ); |
| 5244 | } |
| 5245 | if (arguments.length < 1) { |
| 5246 | throw new globalObject.TypeError( |
| 5247 | "Failed to execute 'forEach' on 'iterable': 1 argument required, but only 0 present." |
| 5248 | ); |
| 5249 | } |
| 5250 | callback = Function2.convert(globalObject, callback, { |
| 5251 | context: "Failed to execute 'forEach' on 'iterable': The callback provided as parameter 1" |
| 5252 | }); |
| 5253 | const thisArg = arguments[1]; |
| 5254 | let pairs = Array.from(this[implSymbol]); |
| 5255 | let i3 = 0; |
| 5256 | while (i3 < pairs.length) { |
| 5257 | const [key, value] = pairs[i3].map(utils.tryWrapperForImpl); |
| 5258 | callback.call(thisArg, value, key, this); |
| 5259 | pairs = Array.from(this[implSymbol]); |
| 5260 | i3++; |
| 5261 | } |
| 5262 | } |
| 5263 | get size() { |
| 5264 | const esValue = this !== null && this !== void 0 ? this : globalObject; |
| 5265 | if (!exports2.is(esValue)) { |