Re: [WebIDL] Remove string constants

On Thu, 20 Oct 2011 14:26:37 +0900, Jonas Sicking <jonas@sicking.cc> wrote:
> However, there still is an argument for the constant, which is that it
> enables feature detection. With for example
> XMLHttpRequest.responseType, there is no good way to check what types
> a browser supports. This isn't a big deal right now since all browsers
> which support .responseType at all, support the full set of values.
> However as we add more values that will no longer be the case (we
> already have 3 additional values that we support in Gecko).
>
> So if we can find another solution for this problem, then I'm fine
> with dropping support for string constants.

That is already covered. If you set it to a non-supported value, the value  
remains unchanged. Same with <canvas>.


As an aside, overloading does suffer from the feature detection problem  
(if you use [AllowAny] anyway). Not sure how to solve it there, but it has  
not been a big deal thus far.


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

Received on Thursday, 20 October 2011 05:40:38 UTC