IDL: special DOMString that converts to Unicode

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.


-- 
http://annevankesteren.nl/

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