Because we use it to update the url in the case that it's a protocol relative URL.  The "against" variable is just used for unit tests to verify the correctness of our isCrossDomain method which is why it's ok;  In practice it's always window.location.