这是
实验性技术
检查
浏览器兼容性表格
要小心谨慎在生产中使用这之前。
URLUtilsReadOnly
.toString()
stringifier method returns a
DOMString
containing the whole URL. It is a synonym for
URLUtilsReadOnly.href
.
string = object.toString();
// In a Web worker, on the page https://developer.mozilla.org/en-US/URLUtilsReadOnly.href var result = window.self.toString(); // Returns:'https://developer.mozilla.org/en-US/URLUtilsReadOnly.href'
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
toString
|
Chrome No | Edge No | Firefox 3.5 | IE No | Opera No | Safari No | WebView Android No | Chrome Android No | Firefox Android 4 | Opera Android No | Safari iOS No | Samsung Internet Android No |
完整支持
不支持
实验。期望将来行为有所改变。
URLUtilsReadOnly
interface it belongs to.
URLUtilsReadOnly
toString()