in JSDOMParser.js [638:652]
get baseURI() {
if (!this.hasOwnProperty("_baseURI")) {
this._baseURI = this.documentURI;
var baseElements = this.getElementsByTagName("base");
var href = baseElements[0] && baseElements[0].getAttribute("href");
if (href) {
try {
this._baseURI = new URL(href, this._baseURI).href;
} catch (ex) {
/* Just fall back to documentURI */
}
}
}
return this._baseURI;
},