Re: [ServiceWorker] Can we change the body attribute of Request/Response to a method? (#606)

If 2i is indeed platform dependent and we can imagine solutions that do not have this issue (and I think we can, e.g. if the whole stack was JavaScript), we should go with a getter.

And to be clear, there are some drawbacks against the method solution that I'm not sure have been mentioned:

* A method typically returns a fresh object, whereas this would keep returning the same object. (`x.y() === x.y()`.)
* All methods on `Request` and `Response` that have to do with the body return a fresh promise.

---
Reply to this email directly or view it on GitHub:
https://github.com/slightlyoff/ServiceWorker/issues/606#issuecomment-71162902

Received on Friday, 23 January 2015 08:40:26 UTC