- From: Anne van Kesteren <notifications@github.com>
- Date: Thu, 07 Feb 2019 01:06:38 -0800
- To: w3c/FileAPI <FileAPI@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Thursday, 7 February 2019 09:07:00 UTC
Returning a new object each time from a getter is an anti-pattern. We want `obj.x === obj.x` to be true. (It's okay to update `obj.x` at well-defined times, but that would still mean the comparison yields true.) Given that, duplication coupled with partial modification (perhaps `stream()` rather than `body`; and no need for `blob()`, `bodyUsed`, or `formData()` I suspect) seems like the way to go. There might be ways to share a bunch of underlying infrastructure though and even some of the IDL if we split the mixin. I'd be open to such a refactoring of Fetch to enable this functionality on `Blob` objects. (I guess the one question I have is whether it makes sense to have blobs that once read can be collected. But I guess that would bring back `close()` and all its issues.) -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/w3c/FileAPI/issues/40#issuecomment-461338696
Received on Thursday, 7 February 2019 09:07:00 UTC