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

> (Cont'd) As you said, if the ReadableStream API had some interface to tell it explicitly to start, the issue can be addressed on Streams API spec side. That's the plan (2) of Domenic's post.

Yes. If the ReadableStream API had some interface to tell it explicitly to start, .body getter is OK for me.


> Note that this won't have any script-observable consequences though; it will just cause an IPC.

Yes.
If the response is from fetch() API, it will be an IPC for a data move from the network buffer in the kernel layer to the buffer in the JavaScipt world.
If the response is from Cache API, it will be an IPC for a data copy from the HDD to the buffer in the JavaScipt world using.

I think I will be surprised if I hear the sound from the HDD when I just touched .body attribute.
But if it is not surprising for the developer who are using JavaScript, .body getter is OK for me.


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

Received on Thursday, 22 January 2015 23:47:47 UTC