URLUtilsReadOnly - Web APIs 编辑

Obsolete

This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:119 次

字数:4716

最后编辑:7年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文