> >> Making a boolean a tri-state with a
> >> default depending on an external variable is also super confusing.

> >

> > To whom?


> It seems confusing to anyone who reads the value.


Good point.


> What would it return
> in the various situations? I.e. before and after .open() has been
> called, and if .open() was called with a cross-origin URL or not.



Simplest possibility seems to be "undefined" if not set, true or false 
respectively if it was set. Of course this doesn't reflect whether credentials 
will be sent in the request or not - but that doesn't really happen today 
either, we don't automagically make it return "true" for same-origin and 
"false" for cross-origin requests, so it's not much of a change. Most 
capability detection I've seen uses the sensible "'withCredentials' in xhr" 
form which will still work.


-- 
Hallvord R. M. Steen
Core tester, Opera Software






Reply via email to