W3C home > Mailing lists > Public > public-script-coord@w3.org > October to December 2012

IDL: special DOMString that converts to Unicode

From: Anne van Kesteren <annevk@annevk.nl>
Date: Fri, 26 Oct 2012 12:59:05 +0200
Message-ID: <CADnb78gy43qN=sdWYDYUSU5ycsKEVUeDF+sE6BG_q_MEjODRKQ@mail.gmail.com>
To: public-script-coord@w3.org
There is quite a number of APIs that take a string and expect it to
not contain code unit garbage (lone surrogates):

* XMLHttpRequest.open() url / user / password arguments
* XMLHttpRequest.send() data argument
* XMLHttpRequest.responseText (though this one does not matter much)
* TextEncoder.encode() input argument
* Everything in http://url.spec.whatwg.org/#api
* WebSocket API
* A bunch of HTML attributes that set URLs.

I think we should introduce UTFString to make this conversion explicit
and not bother tons of standards with boilerplate language that is
easily forgotten.

Received on Friday, 26 October 2012 10:59:32 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:07 UTC