On Tue, Apr 20, 2010 at 10:05 PM, Anne van Kesteren <annevk@opera.com>wrote:
> 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.
I dislike "AnonXMLHttpRequest" because the request is not necessarily
anonymous. For example, the requestor may very well place identifying info
in the body '{"from": "john@example.com", ...}'.
I like constructor name already shown at <
http://dev.w3.org/2006/waf/UMP/#ump-api-name>: "UniformRequest".
>
>
>
> --
> Anne van Kesteren
> http://annevankesteren.nl/
>
>
--
Cheers,
--MarkM