Re: UMP / CORS: Implementor Interest

On Wed, 21 Apr 2010 03:47:06 +0900, Maciej Stachowiak <mjs@apple.com>  
wrote:
> I kinda hate the boolean argument. I would rather have a syntax where  
> the intent is obvious from the source code. A boolean is not very self- 
> documenting. In fact I can't even remember right now whether true or  
> false is the value that gives you anonymous XHR. Possibilities:
>
> - Separate AnonXMLHttpRequest constructor
> - Constructor parameter takes an enum value, so you write new  
> XMLHttpRequest(ANON) or something like that.
> - Constructor parameter takes a string value, so you write new  
> XMLHttpRequest("anon") or ("anonymous") or whatever.

I guess a separate constructor is the easiest way to go then. I wasn't  
sure whether it was worth it as it clutters the global object some more.


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

Received on Wednesday, 21 April 2010 05:06:34 UTC