No estándar
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.
El método toSource()
devuelve una cadena que representa el código fuente del objeto.
Sintaxis
String.toSource()
str.toSource()
Valor devuelto
Una cadena que representa el código fuente del objeto.
Descripción
El método toSource()
devuelve los siguientes valores:
Para el objeto incorporado String
, toSource()
devuelve la siguiente cadena indicando que el código fuente no está disponible:
function String() {
[native code]
}
Para instancias de String
o cadenas literales, toSource()
devuelve una cadena representando el código fuente.
Este método usualmente es llamado internamente por JavaScript y no explícitamente en código.
Especificaciones
No es parte de ningún estándar. Implementado en JavaScript 1.3.
Compatibilidad entre navegadores
BCD tables only load in the browser
La tabla de compatibilidad en esta página es generada desde datos estructurados. Si deseas contribuir a los datos, por favor visita https://github.com/mdn/browser-compat-data y envianos un pull request.