On Fri, Feb 26, 2010 at 12:20 PM, Darin Fisher <[email protected]> wrote: > On Fri, Feb 26, 2010 at 12:04 PM, Diogo Resende <[email protected]> > wrote: >> >> >> > No. pushCookies would be a way of pushing cookies to the >> > current js and >> > then you could call getCookie several times without defining a >> > callback. >> > It would be almost like: >> > >> > document.observe("cookieload", myAppLoad) >> > >> > >> > Right. My point was that you could implement pushCookies on top of >> > Adam's API. >> > >> > >> > -Darin >> >> Agree. Just like you could implement Adam's API on top of current >> browsers cookies spec :P >> > > > No, I don't think that is possible. Adam's spec reveals a lot of extra > information that "document.cookie" does not return. For example, it exposes > domain and expiry information. > But, I think your point was that it would be possible to simulate an > asynchronous API on top of a synchronous one. I agree that is possible, but > it would not perform very well.
Another problem is that some current browsers do not implement document.cookie in a non-racy way. So while you could implement Adams API, you couldn't guarantee that it wouldn't be racy. However implementations should be able to implement Adams asynch API with no race problems. / Jonas
