Well, I hope I explain it correctly.
The following is the W3C DOM interface specification for documentUri :
documentUri type DOMString introduced in DOM Level 3
The location of the document, or null if undefined, or if the document was created using DOMImplementation.createDocument . When this attribute is set, lexical verification is not performed; this can result in a null value when using Node.baseURI .
Remember that when Document supports the HTML function [DOM Level 2 HTML], the href attribute of the HTML BASE element takes precedence over this attribute when computing Node.baseURI .
What does this mean for you?
But I don’t understand if this parameter is the value that this object detects, or can the user change this parameter?
This is the URI of the document. If you load a remote URI, for example, for example, this page, it will contain a remote URI, for example. The URL currently displayed in the browser address bar. The value is publicly available, so it is writable.
Does this value have any effect on html parsing using the loadHTML method?
In theory, yes. In practice, this depends on whether your DOMImplementation function has an HTML 2.0 function .
Can this be used to absolutize all relative references in the document being analyzed?
Not automatically. But you can really use it to add it manually to any links starting with the path. Of course, you need to implement the logic to check if you need to expand the href value.