code: function resolveURL(url) {
  		return new URI(url).absoluteTo(new URI(document.baseURI).search("")).toString();
  	}
docs: resolves the given (potentially relative) URL in the same way as the browser would resolve it