WICG / cookie-store

Asynchronous access to cookies from JavaScript
https://wicg.github.io/cookie-store/
Apache License 2.0
143 stars 35 forks source link

Fix up encoding definitions/references #202

Closed inexorabletash closed 1 year ago

inexorabletash commented 3 years ago

Following dd2ddc7ce8b081ef10d913fc71b862059d8c1a4f there's this text:

To encode a string, run UTF-8 encode on string.

This text is unnecessary, as places that need to encode invoke "UTF-8 encode" directly. We should either:

At the same time, we should consider if this definition is worthwhile:

To decode a value, run UTF-8 decode without BOM on value.

In theory we could remove that and make the UTF-8 decoding inline, but the "without BOM" part makes it wordier.

cc: @recvfrom

domenic commented 3 years ago

Chiming in from the sidelines, I think using the wordier definitions and removing your own spec's definitions of "encode" and "decode" would make things clearer for the reader.