mozilla

Revision 462009 of URLUtilsReadOnly

  • Revision slug: Web/API/URLUtilsReadOnly
  • Revision title: URLUtilsReadOnly
  • Revision id: 462009
  • Created:
  • Creator: teoli
  • Is current revision? No
  • Comment

Revision Content

{{SeeCompatTable}}

The URLUtilsReadOnly interface defines utility methods to work with URL. It defines only non-modified methods intended to be used on data that cannot be modified.

There are no object of this type, but several interface are implemented it, like {{domxref("WorkerLocation")}}

Properties

This interface doesn't inherit any property

{{domxref("URLUtilsReadOnly.href")}} {{readOnlyInline}}
Is a {{domxref("DOMString")}} containing the whole URL.
{{domxref("URLUtilsReadOnly.protocol")}} {{readOnlyInline}}
Is a {{domxref("DOMString")}} containing the protocol scheme of the URL, including the final ':'.
{{domxref("URLUtilsReadOnly.host")}} {{readOnlyInline}}
Is a {{domxref("DOMString")}} containing the host, that is the hostname, a ':', and the port of the URL.
{{domxref("URLUtilsReadOnly.hostname")}} {{readOnlyInline}}
Is a {{domxref("DOMString")}} containing the domain of the URL.
{{domxref("URLUtilsReadOnly.port")}} {{readOnlyInline}}
Is a {{domxref("DOMString")}} containing the port number of the URL.
{{domxref("URLUtilsReadOnly.pathname")}} {{readOnlyInline}}
Is a {{domxref("DOMString")}} containing an initial '/' followed by the path of the URL.
{{domxref("URLUtilsReadOnly.search")}} {{readOnlyInline}}
Is a {{domxref("DOMString")}} containing a '?' followed by the parameters of the URL.
{{domxref("URLUtilsReadOnly.hash")}} {{readOnlyInline}}
Is a {{domxref("DOMString")}} containing a '#' followed by the fragment identifier of the URL.

Methods

This interface doesn't inherit any method.

{{domxref("URLUtilsReadOnly.toString()")}}
Returns a {{domxref("DOMString")}} containing the whole URL. It is a synonym for {{domxref("URLUtilsReadOnly.href")}}.
 

Revision Source

<p>{{SeeCompatTable}}</p>
<p>The <strong><code>URLUtilsReadOnly</code></strong> interface defines utility methods to work with URL. It defines only non-modified methods intended to be used on data that cannot be modified.</p>
<p>There are no object of this type, but several interface are implemented it, like {{domxref("WorkerLocation")}}</p>
<h2 id="Properties">Properties</h2>
<p><em>This interface doesn't inherit any property</em></p>
<dl>
  <dt>
    {{domxref("URLUtilsReadOnly.href")}} {{readOnlyInline}}</dt>
  <dd>
    Is a {{domxref("DOMString")}} containing the whole URL.</dd>
  <dt>
    {{domxref("URLUtilsReadOnly.protocol")}} {{readOnlyInline}}</dt>
  <dd>
    Is a {{domxref("DOMString")}} containing the protocol scheme of the URL, including the final <code>':'</code>.</dd>
  <dt>
    {{domxref("URLUtilsReadOnly.host")}} {{readOnlyInline}}</dt>
  <dd>
    Is a {{domxref("DOMString")}} containing the host, that is the <em>hostname</em>, a <code>':'</code>, and the <em>port</em> of the URL.</dd>
  <dt>
    {{domxref("URLUtilsReadOnly.hostname")}} {{readOnlyInline}}</dt>
  <dd>
    Is a {{domxref("DOMString")}} containing the domain of the URL.</dd>
  <dt>
    {{domxref("URLUtilsReadOnly.port")}} {{readOnlyInline}}</dt>
  <dd>
    Is a {{domxref("DOMString")}} containing the port number of the URL.</dd>
  <dt>
    {{domxref("URLUtilsReadOnly.pathname")}} {{readOnlyInline}}</dt>
  <dd>
    Is a {{domxref("DOMString")}} containing an initial <code>'/'</code> followed by the path of the URL.</dd>
  <dt>
    {{domxref("URLUtilsReadOnly.search")}} {{readOnlyInline}}</dt>
  <dd>
    Is a {{domxref("DOMString")}} containing a <code>'?'</code> followed by the parameters of the URL.</dd>
  <dt>
    {{domxref("URLUtilsReadOnly.hash")}} {{readOnlyInline}}</dt>
  <dd>
    Is a {{domxref("DOMString")}} containing a <code>'#'</code> followed by the fragment identifier of the URL.</dd>
</dl>
<h2 id="Methods">Methods</h2>
<p><em>This interface doesn't inherit any method.</em></p>
<dl>
  <dt>
    {{domxref("URLUtilsReadOnly.toString()")}}</dt>
  <dd>
    Returns a {{domxref("DOMString")}} containing the whole URL. It is a synonym for {{domxref("URLUtilsReadOnly.href")}}.</dd>
</dl>
<dl>
  <dt>
    &nbsp;</dt>
</dl>
Revert to this revision