* @param {HeadersInit|Symbol} [init] * @returns
(init = undefined)
| 436 | * @returns |
| 437 | */ |
| 438 | constructor (init = undefined) { |
| 439 | webidl.util.markAsUncloneable(this) |
| 440 | |
| 441 | if (init === kConstruct) { |
| 442 | return |
| 443 | } |
| 444 | |
| 445 | this.#headersList = new HeadersList() |
| 446 | |
| 447 | // The new Headers(init) constructor steps are: |
| 448 | |
| 449 | // 1. Set this’s guard to "none". |
| 450 | this.#guard = 'none' |
| 451 | |
| 452 | // 2. If init is given, then fill this with init. |
| 453 | if (init !== undefined) { |
| 454 | init = webidl.converters.HeadersInit(init, 'Headers constructor', 'init') |
| 455 | fill(this, init) |
| 456 | } |
| 457 | } |
| 458 | |
| 459 | // https://fetch.spec.whatwg.org/#dom-headers-append |
| 460 | append (name, value) { |
nothing calls this directly
no test coverage detected