Date.prototype.toSource()
Non-standard: This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.
The toSource()
method returns a string representing the
source code of the object.
Syntax
dateObj.toSource()
Date.toSource()
Return value
A string representing the source code of the given Date
object.
Examples
Native function
For the built-in Date
object, toSource()
returns the
following string indicating that the source code is not available:
function Date() {
[native code]
}
Specifications
Not part of any standard.
Browser compatibility
BCD tables only load in the browser