RE: Spec Updates

We had a similar discussion in the Page Visibility review, and came to the same conclusion that having constants has the advantage of allowing web developers to inspect for capability via developer tools and IDEs rather than read the specification. 

I don't believe WebIDL currently supports enums; based on this thread, http://lists.w3.org/Archives/Public/public-script-coord/2011AprJun/0111.html, appears like integer enums may be considered in a  future version of the spec. When we actually support string enums, we can update the specification.

Jatinder

-----Original Message-----
From: Anne van Kesteren [mailto:annevk@opera.com] 
Sent: Tuesday, October 18, 2011 7:39 PM
To: public-web-perf@w3.org; Jatinder Mann
Subject: Re: Spec Updates

On Wed, 19 Oct 2011 09:31:12 +0900, Jatinder Mann <jmann@microsoft.com>
wrote:
> - ACTION-53: Updated constants to be DOMString from unsigned shorts

FWIW, this does not address my comments. If you have strings you do not need constants. That's the whole point of having string values. See e.g.  
the <canvas> 2D API or XMLHttpRequest responseType.

Eventually we will probably express this in IDL as an enum or some such, but definitely not as constants.


--
Anne van Kesteren
http://annevankesteren.nl/

Received on Wednesday, 19 October 2011 17:20:01 UTC