There is a tricky way:
function getLocation (href) { var l = document.createElement('a'); l.href = href; return l; }