<br><br><div class="gmail_quote">On Mon, Mar 9, 2009 at 10:23 AM, Jonas Sicking <span dir="ltr">&lt;jonas@sicking.cc&gt;</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">
<br>
</div>The problem is that people are likely to write code like:<br>
<br>
if (self.getAllCookies() != &quot;magic value&quot;) {<br>
  a = self.getAllCookies();<br>
  ...do stuff...<br>
}<br>
<br>
at that point it&#39;s entirely possible for &#39;a&#39; to have the value &quot;magic<br>
value&quot; which is likely to cause the script to break.</blockquote><div class="im"><br>Here we are making assumptions about how people will use routines that don&#39;t actually exist yet. If you were to substitute &quot;new Date().getTime()&quot; for &quot;self.getAllCookies()&quot; in the code above, I think we&#39;d all agree that the user expectation is faulty - is it not feasible to state that, just like Date().getTime(),. getAllCookies() returns a snapshot of a mutable value?<br>
<br>I&#39;m OK with making setCookie() asynchronous, because I think there may be a valid point that you don&#39;t want new worker code to suddenly break existing JS code that expects document.cookies to remain immutable across a single block of execution. But I don&#39;t see that argument extending to getAllCookies().<br>
<br></div><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"><br>
<br>
</div>Indeed. It does seem like you would be able to ask ;)<br>
<font color="#888888"></font></blockquote><div><br>I&#39;m looking into this now, actually :) - I&#39;ll let you know what I find out.<br><br>-atw <br></div></div><br>