URL management facility?
<p>Is there a (native) javascript API that offers the "functionality" of window.location to custom URLs? something along the lines of</p>

<pre><code>var url = new URL("http://stackoverflow.com/question?hello=world#foo");
console.log(url.hostname, url.path);
// out: "stackoverflow.com", "/question"
url.hash = "bar";
url.query = "";
console.log(url);
// out: "http://stackoverflow.com/question#bar"
</code></pre>

<p>I'm fairly certain there is no native API for this (for what reason ever). If someone implemented this, please share the link.</p>
