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 forURLUtilsReadOnly.href
.
Browser compatibility
BCD tables only load in the browser
See also
- Other URL-related interfaces:
URL
,URLUtils
, andURLQuery
. - Interfaces implementing this one:
WorkerLocation
.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论