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 un string representando el código fuente del objeto.
Sintaxis
function.toSource();
Function.toSource();
Parámetros
Ninguno.
Descripción
El método toSource
devuelve los siguientes valores:
- For the built-in
Function
object,toSource()
devuelve la siguiente cadena indicando que el código fuente no está disponible:function Function() { [native code] }
- En funciones personalizadas,
toSource()
devuelve el código JavaScript que define el objeto como un string.
Éste método es usado de forma interna por JavaScript y no explicitamente desde el código. Puedes usar toSource
mientras depuras para examinar el contenido de un objeto.
Especificaciones
No está reflejado en ningún estándar. Implementaso en JavaScript 1.3.
Browser compatibility
We're converting our compatibility data into a machine-readable JSON format.
This compatibility table still uses the old format,
because we haven't yet converted the data it contains.
Find out how you can help!
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|
Basic support | Sin soporte | (Yes) | ? | ? | ? |
Feature | Android | Chrome for Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|
Basic support | ? | ? | (Yes) | ? | ? | ? |