Node.baseURIObject

  • Revision slug: DOM/Node.baseURIObject
  • Revision title: Node.baseURIObject
  • Revision id: 386923
  • Created:
  • Creator: Nickolay
  • Is current revision? No
  • Comment

Revision Content

{{DomRef}} {{Fx_minversion_header("3")}} {{Non-standard_header}}

Summary

baseURIObject returns the {{Interface("nsIURI")}} representing the node's (typically a document or an element) base URL. It's similar to {{domxref("Node.baseURI")}}, except it returns an nsIURI instead of a string.

This property exists on all nodes (HTML, XUL, SVG, MathML, etc.), but only if the script trying to use it has UniversalXPConnect privileges.

See {{domxref("Node.baseURI")}} for details on what the base URL is.

Syntax

uriObj = node.baseURIObject

Notes

This property is read-only; attempting to write to it will throw an exception. In addition, this property may only be accessed from privileged code.

Specification

Not in any specification.

Revision Source

<div>
  {{DomRef}} {{Fx_minversion_header("3")}} {{Non-standard_header}}</div>
<h2 id="Summary" name="Summary">Summary</h2>
<p><code>baseURIObject</code> returns the {{Interface("nsIURI")}} representing the node's (typically a document or an element) base URL. It's similar to {{domxref("Node.baseURI")}}, except it returns an nsIURI instead of a string.</p>
<p>This property exists on all nodes (HTML, XUL, SVG, MathML, etc.), but only if the script trying to use it has UniversalXPConnect privileges.</p>
<p>See {{domxref("Node.baseURI")}} for details on what the base URL is.</p>
<h2 id="Syntax" name="Syntax">Syntax</h2>
<pre class="syntaxbox">
<var>uriObj</var> = <em>node</em>.baseURIObject
</pre>
<h2 id="Notes" name="Notes">Notes</h2>
<p>This property is read-only; attempting to write to it will throw an exception. In addition, this property may only be accessed from privileged code.</p>
<h2 id="Specification" name="Specification">Specification</h2>
<p>Not in any specification.</p>
Revert to this revision