<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Aug 3, 2009, at 10:34 AM, Daniel Gredler wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><br><div class="gmail_quote">On Sat, Aug 1, 2009 at 4:59 PM, Ian Hickson <span dir="ltr"><<a href="mailto:ian@hixie.ch">ian@hixie.ch</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> <div class="im">On Wed, 22 Jul 2009, Daniel Gredler wrote:<br> ><br> > First, why does the structured clone algorithm used by postMessage() [1]<br> > throw an exception if it encounters cycles? It seems to me that the<br> > memory-based logic which is used to catch cycles could easily be<br> > modified to resolve them instead. The only possible reason I can think<br> > of is to match JSON semantics, and the only reason I can think of to<br> > want to match JSON semantics is to make implementers lives easier<br> > (witness Firefox 3.5, which just JSONifies objects passed to<br> > postMessage()). However, this is a huge limitation, and I'm not sure<br> > that the correct trade-off is to make implementers lives easier at the<br> > expense of making web designers lives harder.<br> <br> </div>Your guess is correct. I imagine we'll lift the restriction eventually; if<br> you want to make that happen quicker, then I encourage you to speak<br> directly to the browser vendors implementing this, and convince them it'd<br> be worth it. :-)<br><div></div></blockquote><div><br><br>I know Anne VK (Opera) and ROC (Mozilla) appear to read this list... any comments, guys? Should I just file bugs? Any Safari / Chrome / IE guys out there with comments?<br></div></div></blockquote><div><br></div><div>I'd prefer to stick with JSONic object graphs for now. Correctly cloning more complicated object structures is a fair bit more complicated, so I'd like to get solid interop on the basic cases first. Also, the idea is that postMessage() should be sending object structures that are essentially pure data. JSON seems to capture pretty well the idea of a pure data structure in JavaScript.</div><div><br></div><div>Regards,</div><div>Maciej</div><div><br></div></div></body></html>