[whatwg] whatwg Digest, Vol 71, Issue 72
Adam Barth
w3c at adambarth.com
Wed Feb 24 08:50:49 PST 2010
On Wed, Feb 24, 2010 at 3:55 AM, Anthony <antscape at gmail.com> wrote:
> On Tue, Feb 23, 2010 at 8:56 PM, Adam Barth <w3c at adambarth.com> wrote:
>> The document.cookie API is kind of terrible. Web developers shouldn't
>> have to parse a cookie-string or prepare a properly formated
>> set-cookie-string. Here's a proposal for an HTML cookie API that
>> isn't as terrible:
>>
>>
>> https://docs.google.com/Doc?docid=0AZpchfQ5mBrEZGQ0cDh3YzRfMTRmdHFma21kMg&hl=en
>>
>> I'd like to propose we include this API in a future version of HTML.
>> As always, feedback welcome.
>
> Sounds good, just a little suggestion:
> Maybe something like document.cookies.push({name: "a", value: "b"}) and/or
> document.cookies["a"]="b". Something similar to HTMLElement.style?
What's the advantage of putting the methods on a sub object of
document? That just seems like additional complexity. We don't want
to use the array syntax because we want the API to be asynchronous.
Adam
More information about the whatwg
mailing list