Boris Zbarsky:
For what it's worth, I would be reasonably happy if we had a
non-DOMString IDL type to indicate "raw byte sequence" strings,
with WebIDL defining byte-inflation as the conversion from such
things to JS strings...

Anne van Kesteren:
That's an interesting idea. We could also use that for open()'s
method argument (as doing the opposite, throw for higher than
U+00FF, then deflate).

OK, so just like DOMString is a "raw 16 bit word sequence" string, this new type would be a raw 8 bit byte sequence string. ByteString sounds like a good name for it. (Although it may be inconsistent with "octet" being unsigned and "byte" being signed...) Would the deflation from a JS String throw when it finds values > 255?

Reply via email to