- From: Domenic Denicola <notifications@github.com>
- Date: Tue, 07 Feb 2017 11:52:36 -0800
- To: whatwg/fetch <fetch@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Tuesday, 7 February 2017 19:53:24 UTC
Having been asked to weigh in, here are my weak preferences: - I sympathize with `{}` meaning explicit "the list is empty". Let's keep that. So `{ headers: {} }` means an empty headers list. - I think `undefined` for *any* dictionary member should be equivalent to the member not being present. So `{ headers: undefined }` should be the same as `{ }` (which I believe means "copy the input"?) - In general I think it probably makes sense for `null` and `undefined` to not be convertible to records. So `{ headers: null }` should be an error. `{ headers: undefined }` is not an error per above, since it's a dictionary member, but if we had a function `doStuffWithHeaders(record<DOMString, DOMString> headers)` then IMO `doStuffWithHeaders(undefined)` or `doStuffWith()` should throw. I don't think we need a new extended attribute for any of this. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/whatwg/fetch/issues/479#issuecomment-278120112
Received on Tuesday, 7 February 2017 19:53:24 UTC