From 074785cea106179cb3305637055ab0a009ca74f2 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:42:52 -0500 Subject: initial commit --- files/pt-br/web/api/performance/tojson/index.html | 61 +++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 files/pt-br/web/api/performance/tojson/index.html (limited to 'files/pt-br/web/api/performance/tojson') diff --git a/files/pt-br/web/api/performance/tojson/index.html b/files/pt-br/web/api/performance/tojson/index.html new file mode 100644 index 0000000000..2dac99f0f5 --- /dev/null +++ b/files/pt-br/web/api/performance/tojson/index.html @@ -0,0 +1,61 @@ +--- +title: Performance.toJSON() +slug: Web/API/Performance/toJSON +translation_of: Web/API/Performance/toJSON +--- +
{{APIRef("High Resolution Timing")}}
+ +

O método toJSON() da interface {{domxref("Performance")}} é um serializador padrão: Ele retorna uma representação em JSON das propriedades do objeto performance.

+ +

Sintaxe

+ +
minhaPerf = performance.toJSON()
+
+ +

Argumentos

+ +
+
Nenhum
+
 
+
+ +

Valor de retorno

+ +
+
minhaPerf
+
Um objeto JSON que é a serialização do objeto {{domxref("Performance")}}.
+
+ +

Exemplo

+ +
var js;
+js = window.performance.toJSON();
+console.log("json = " + JSON.stringify(js));
+
+ +

Especificações

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('Highres Time Level 2', '#the-performance-interface', 'toJSON() serializer')}}{{Spec2('Highres Time Level 2')}}Define toJson().
+ +

Compatibilidade de navegadores

+ +
+
+ + +

{{Compat("api.Performance.toJSON")}}

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