- From: Jonas Sicking <notifications@github.com>
- Date: Sun, 30 Oct 2016 12:34:47 -0700
- To: whatwg/streams <streams@noreply.github.com>
Received on Sunday, 30 October 2016 19:35:28 UTC
Structured cloning has to happen synchronously when the data is put into
the stream. Otherwise it is very unclear what data is actually written.
Consider for example:
```javascript
x = { a: 1 };
writer.write(x);
x.a = 2;
```
Or
```javascript
x = { a: 1 };
writer.write(x);
someButton.onclick = () =>
{ x.a = 2; };
```
This is why structured cloning happens synchronously in functions like
`port.postMessage()` and `objectStore.put()`.
--
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/streams/issues/244#issuecomment-257173204
Received on Sunday, 30 October 2016 19:35:28 UTC