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

Re: Numeric constants vs enumerated strings

From: Anne van Kesteren <annevk@opera.com>
Date: Thu, 16 Feb 2012 09:57:54 +0100
To: "Alex Russell" <slightlyoff@google.com>, "Marcos Caceres" <w3c@marcosc.com>, "Travis Leithead" <travis.leithead@microsoft.com>, Philip J├Ągenstedt <philipj@opera.com>
Cc: "Dominique Hazael-Massieux" <dom@w3.org>, "public-script-coord@w3.org" <public-script-coord@w3.org>, "Harald Alvestrand" <harald@alvestrand.no>, "public-webrtc@w3.org" <public-webrtc@w3.org>
Message-ID: <op.v9rkisj464w2qv@annevk-macbookpro.local>
On Thu, 16 Feb 2012 08:58:05 +0100, Philip J├Ągenstedt <philipj@opera.com>  
wrote:
> Can't we have our cake and eat it too? If we really want to favor  
> consistency on the scripting side (not implementation), we could let  
> HTMLMediaElement.readyState and XMLHttpRequest.readyState return magic  
> objects that compare true both to their string and their numeric  
> constants. It might have to toString to the number, though...

That sounds somewhat messy.

In any event, Document.readyState already returns a string (and not even  
because we designed it that way, because it so happened to be in  
Microsoft's implementation), so the inconsistency is already there.


-- 
Anne van Kesteren
http://annevankesteren.nl/
Received on Thursday, 16 February 2012 08:58:31 UTC

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