See with Node.prototype.baseURI, modified with the <base>;
document.baseURI; // https://www.cnblogs.com/aisowe
// <base href="https://www.google.com/" /> // <a href="/test.html"> test </a> document.querySelector('a').baseURI; // https://www.google.com/
If you can not get, null is returned.