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

Re: Numeric constants vs enumerated strings

From: Timothy B. Terriberry <tterriberry@mozilla.com>
Date: Wed, 15 Feb 2012 13:42:45 -0800
Message-ID: <4F3C26D5.3000109@mozilla.com>
CC: public-script-coord@w3.org, "public-webrtc@w3.org" <public-webrtc@w3.org>, public-webapps@w3.org, public-html@w3.org
Dominique Hazael-Massieux wrote:
> There are strong ties, in the sense that the said API would be exposing
> a readyState property (similar to XMLHttpRequest, HTMLMedia, etc).

For the WebSocket API in particular 
(http://dev.w3.org/html5/websockets/#the-websocket-interface), I would 
note that readyState is an unsigned short, while binaryType is a string 
enumeration. I.e., there seems to have been a conscious decision to use 
the former in spite of the preference for things like the latter (at 
least just from looking at the IDL... I wasn't involved, so I don't know 
the history).
Received on Wednesday, 15 February 2012 21:43:11 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 May 2013 19:30:05 UTC