On Wed, Feb 24, 2010 at 5:00 PM, Nicholas Zakas <[email protected]> wrote: > Even though there can be multiple cookies with the same name on a single > document, this most frequently occurs due to error rather than intention. > I've never received a YUI bug report about this occurrence though I have > considered returning an array of values instead of just the first value in > this case. I might just go do that now. :) > > My initial comment still remains: retrieving the value of a single named > cookie seems to be a much more common use case than retrieving all cookies. > You can choose to solve the duplicate cookie name issue in a number of ways, > but not providing a way to access a cookie by name seems like a flaw in this > design.
Done. I've made the API return the first cookie that matches the specified name. If a web developer wants to get all the cookies, I've added a getAllCookies() API. Adam
