URLUtilsReadOnly

Deprecated

This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.

The obsolete URLUtilsReadOnly interface previously defined utility methods for working with URLs. These were then inherited by other interfaces, such as WorkerLocation. URLUtilsReadOnly has been removed from the specification, and the properties it defined are now directly part of the affected interfaces.

Properties

This interface doesn't inherit any properties.

URLUtilsReadOnly.href Read only
Is a DOMString containing the whole URL.
URLUtilsReadOnly.protocol Read only
Is a DOMString containing the protocol scheme of the URL, including the final ':'.
URLUtilsReadOnly.host Read only
Is a DOMString containing the host, that is the hostname, a ':', and the port of the URL.
URLUtilsReadOnly.hostname Read only
Is a DOMString containing the domain of the URL.
URLUtilsReadOnly.origin Read only
Returns a DOMString containing the canonical form of the origin of the specific location.
URLUtilsReadOnly.port Read only
Is a DOMString containing the port number of the URL.
URLUtilsReadOnly.pathname Read only
Is a USVString containing an initial '/' followed by the path of the URL, not including the query string or fragment.
URLUtilsReadOnly.search Read only
Is a DOMString containing a '?' followed by the parameters of the URL.
URLUtilsReadOnly.hash Read only
Is a DOMString containing a '#' followed by the fragment identifier of the URL.

Methods

This interface doesn't inherit any methods.

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

Browser compatibility

BCD tables only load in the browser

See also