过时
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.
toSource()
method returns a string representing the source code of the object.
booleanObj.toSource() Boolean.toSource()
A string representing the source code of the object.
For the built-in
布尔
对象,
toSource
returns the following string indicating that the source code is not available:
function Boolean() {
[native code]
}
Not part of any standard.
| Desktop | Mobile | Server | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
toSource
非标
|
Chrome No | Edge No |
Firefox
1 — 74
|
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 | nodejs No |
完整支持
不支持
非标。预期跨浏览器支持较差。
见实现注意事项。
布尔
Boolean.prototype.toSource()
Boolean.prototype.toString()
Boolean.prototype.valueOf()
Function
Object
Object.prototype.__defineGetter__()
Object.prototype.__defineSetter__()
Object.prototype.__lookupGetter__()
Object.prototype.__lookupSetter__()
Object.prototype.hasOwnProperty()
Object.prototype.isPrototypeOf()
Object.prototype.propertyIsEnumerable()
Object.prototype.toLocaleString()
Object.prototype.toSource()
Object.prototype.toString()
Object.prototype.valueOf()
Object.setPrototypeOf()