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.
O método toSource()
retorna uma string contendo o código fonte do objeto.
Syntax
numObj.toSource() Number.toSource()
Valor retornado
Uma string contendo o código fonte do objeto.
Descrição
O método toSource()
retorna os seguintes valores:
Para o objeto built-in Number
, o método toSource()
retorna a seguinte string indicando que o código fonte do objeto não está disponível:
function Number() {
[native code]
}
Para instâncias do objeto Number
, toSource()
retorna uma string contendo o código fonte.
Este método normalmente é invocado internamente pelo JavaScript e não explicitamente em um código web.
Especificações
Não é parte de nenhuma especificação padrão. Implementado no JavaScript 1.3.
Browser compatibility
BCD tables only load in the browser
The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.