From 074785cea106179cb3305637055ab0a009ca74f2 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:42:52 -0500 Subject: initial commit --- .../global_objects/string/tosource/index.html | 102 +++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 files/pt-br/web/javascript/reference/global_objects/string/tosource/index.html (limited to 'files/pt-br/web/javascript/reference/global_objects/string/tosource') diff --git a/files/pt-br/web/javascript/reference/global_objects/string/tosource/index.html b/files/pt-br/web/javascript/reference/global_objects/string/tosource/index.html new file mode 100644 index 0000000000..a7f2bce0d5 --- /dev/null +++ b/files/pt-br/web/javascript/reference/global_objects/string/tosource/index.html @@ -0,0 +1,102 @@ +--- +title: String.prototype.toSource() +slug: Web/JavaScript/Reference/Global_Objects/String/toSource +tags: + - JavaScript + - Non-standard + - Obsoleto + - Prototipo + - String + - metodo +translation_of: Web/JavaScript/Reference/Global_Objects/String/toSource +--- +
{{JSRef}} {{obsolete_header}}
+ +

O método toSource() retorna uma string que representa o código-fonte do objeto.

+ +

Sintaxe

+ +
String.toSource()
+str.toSource()
+
+ +

Valor retornado

+ +

Uma string que representa o código-fonte do objeto chamado.

+ +

Exemplos

+ +

Função nativa

+ +

Para o objeto {{jsxref("String")}} , toSource() retorna  a seguinte string (indicando que o código-fonte não está disponível):

+ +
function String() {
+    [native code]
+}
+
+ +

Ao chamar {{jsxref("String")}} ou string literais, toSource() retorna a string que representa o código-fonte.

+ +

Esse método é usualmente invocado internamente pelo JavaScript e não explicitamente no código.

+ +

Especificação

+ +

Não é parte de nenhum padrão.

+ + + +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support{{CompatUnknown}}{{CompatVersionUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
FeatureAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{CompatUnknown}}{{CompatUnknown}}{{CompatVersionUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
+
+ +

Veja também

+ + -- cgit v1.2.3-54-g00ecf