From bfed5821f1191e006820ab31824ebe626fc7dd21 Mon Sep 17 00:00:00 2001 From: Jean-Yves Perrier Date: Fri, 3 Feb 2023 10:15:16 +0100 Subject: [PATCH 1/5] Add toJSON() to PerformanceTiming and PerformanceNavigation --- .../web/api/performancenavigation/index.md | 4 +- .../api/performancenavigation/tojson/index.md | 41 +++++++++++++++++ .../en-us/web/api/performancetiming/index.md | 3 +- .../web/api/performancetiming/tojson/index.md | 45 +++++++++++++++++++ 4 files changed, 90 insertions(+), 3 deletions(-) create mode 100644 files/en-us/web/api/performancenavigation/tojson/index.md create mode 100644 files/en-us/web/api/performancetiming/tojson/index.md diff --git a/files/en-us/web/api/performancenavigation/index.md b/files/en-us/web/api/performancenavigation/index.md index 1703eb18bc149f1..101587e5567ffa1 100644 --- a/files/en-us/web/api/performancenavigation/index.md +++ b/files/en-us/web/api/performancenavigation/index.md @@ -51,7 +51,7 @@ _The `PerformanceNavigation` interface doesn't inherit any properties._ _The `Performance` interface doesn't inherit any methods._ - {{deprecated_inline}} {{domxref("PerformanceNavigation.toJSON()")}} - - : A jsonizer returning a JSON object representing the `PerformanceNavigation` object. + - : A {{Glossary("Serialization","serializer")}} returning a JSON object representing the `PerformanceNavigation` object. ## Specifications @@ -65,4 +65,4 @@ Use the {{domxref("PerformanceNavigationTiming")}} interface instead. ## See also - The {{domxref("Performance")}} that allows access to an object of this type. -- {{domxref("PerformanceNavigationTiming")}} (part of Navigation Timing Level 2) {{experimental_inline}} +- {{domxref("PerformanceNavigationTiming")}} (part of Navigation Timing Level 2) that has superseded this API. diff --git a/files/en-us/web/api/performancenavigation/tojson/index.md b/files/en-us/web/api/performancenavigation/tojson/index.md new file mode 100644 index 000000000000000..8bcd1564987f306 --- /dev/null +++ b/files/en-us/web/api/performancenavigation/tojson/index.md @@ -0,0 +1,41 @@ +--- +title: PerformanceNavigation.toJSON() +slug: Web/API/PerformanceNavigation/toJSON +page-type: web-api-instance-method +tags: + - API + - Method + - Reference + - Web Performance +browser-compat: api.PerformanceNavigation.toJSON +--- + +{{APIRef("Performance API")}} + +The **`toJSON()`** method of the {{domxref("PerformanceENavigation")}} interface is a {{Glossary("Serialization","serializer")}}; it returns a JSON representation of the {{domxref("PerformanceNavigation")}} object. + +## Syntax + +```js-nolint +toJSON() +``` + +### Parameters + +None. + +### Return value + +A {{jsxref("JSON")}} object that is the serialization of the {{domxref("PerformanceNavigation")}} object. + +## Specifications + +{{Specifications}} + +## Browser compatibility + +{{Compat}} + +## See also + +- {{jsxref("JSON")}} diff --git a/files/en-us/web/api/performancetiming/index.md b/files/en-us/web/api/performancetiming/index.md index 00fa26e65f1e9e3..adb26405415ccee 100644 --- a/files/en-us/web/api/performancetiming/index.md +++ b/files/en-us/web/api/performancetiming/index.md @@ -80,7 +80,7 @@ These properties are listed in the order in which they occur during the navigati _The `PerformanceTiming`_ _interface doesn't inherit any methods._ -- {{Deprecated_Inline}} {{domxref("PerformanceTiming.toJSON()")}} +- {{domxref("PerformanceTiming.toJSON()")}} {{Deprecated_Inline}} - : Returns a [JSON object](/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON) representing this `PerformanceTiming` object. ## Specifications @@ -95,3 +95,4 @@ Use the {{domxref("PerformanceNavigationTiming")}} interface instead. ## See also - The {{domxref("Performance.timing")}} property that creates such an object. +- {{domxref("PerformanceNavigationTiming")}} (part of Navigation Timing Level 2) that has superseded this API. diff --git a/files/en-us/web/api/performancetiming/tojson/index.md b/files/en-us/web/api/performancetiming/tojson/index.md new file mode 100644 index 000000000000000..758bf3597bafef3 --- /dev/null +++ b/files/en-us/web/api/performancetiming/tojson/index.md @@ -0,0 +1,45 @@ +--- +title: PerformanceTiming.toJSON() +slug: Web/API/PerformanceTiming/toJSON +page-type: web-api-instance-method +tags: + - API + - Method + - Reference + - Web Performance + - Deprecated +browser-compat: api.PerformanceTiming.toJSON +--- + +{{APIRef("Performance API")}}{{deprecated_header}} + +> **Warning:** This interface of this property is deprecated in the [Navigation Timing Level 2 specification](https://w3c.github.io/navigation-timing/#obsolete). Please use the {{domxref("PerformanceNavigationTiming")}} +> interface instead. + +The legacy **`toJSON()`** method of the {{domxref("PerformanceTiming")}} interface is a {{Glossary("Serialization","serializer")}}; it returns a JSON representation of the {{domxref("PerformanceTiming")}} object. + +## Syntax + +```js-nolint +toJSON() +``` + +### Parameters + +None. + +### Return value + +A {{jsxref("JSON")}} object that is the serialization of the {{domxref("PerformanceTiming")}} object. + +## Specifications + +{{Specifications}} + +## Browser compatibility + +{{Compat}} + +## See also + +- {{jsxref("JSON")}} From 03fec54590f8f5c4b597901b972f55be03b103bb Mon Sep 17 00:00:00 2001 From: Jean-Yves Perrier Date: Fri, 3 Feb 2023 13:27:16 +0100 Subject: [PATCH 2/5] Update files/en-us/web/api/performancenavigation/tojson/index.md Co-authored-by: Florian Scholz --- files/en-us/web/api/performancenavigation/tojson/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/en-us/web/api/performancenavigation/tojson/index.md b/files/en-us/web/api/performancenavigation/tojson/index.md index 8bcd1564987f306..07f3b610ceb8150 100644 --- a/files/en-us/web/api/performancenavigation/tojson/index.md +++ b/files/en-us/web/api/performancenavigation/tojson/index.md @@ -12,7 +12,7 @@ browser-compat: api.PerformanceNavigation.toJSON {{APIRef("Performance API")}} -The **`toJSON()`** method of the {{domxref("PerformanceENavigation")}} interface is a {{Glossary("Serialization","serializer")}}; it returns a JSON representation of the {{domxref("PerformanceNavigation")}} object. +The **`toJSON()`** method of the {{domxref("PerformanceNavigation")}} interface is a {{Glossary("Serialization","serializer")}}; it returns a JSON representation of the {{domxref("PerformanceNavigation")}} object. ## Syntax From b0204eff0ce49fc9e6317ec1dd1ecde2af66e276 Mon Sep 17 00:00:00 2001 From: Jean-Yves Perrier Date: Fri, 3 Feb 2023 13:27:25 +0100 Subject: [PATCH 3/5] Update files/en-us/web/api/performancenavigation/tojson/index.md Co-authored-by: Florian Scholz --- files/en-us/web/api/performancenavigation/tojson/index.md | 1 + 1 file changed, 1 insertion(+) diff --git a/files/en-us/web/api/performancenavigation/tojson/index.md b/files/en-us/web/api/performancenavigation/tojson/index.md index 07f3b610ceb8150..8ec47aaa39fd273 100644 --- a/files/en-us/web/api/performancenavigation/tojson/index.md +++ b/files/en-us/web/api/performancenavigation/tojson/index.md @@ -7,6 +7,7 @@ tags: - Method - Reference - Web Performance + - Deprecated browser-compat: api.PerformanceNavigation.toJSON --- From 80c5041c51a9eb20eb2fb63f9ce4a99d80637fce Mon Sep 17 00:00:00 2001 From: Jean-Yves Perrier Date: Fri, 3 Feb 2023 13:27:34 +0100 Subject: [PATCH 4/5] Update files/en-us/web/api/performancenavigation/tojson/index.md Co-authored-by: Florian Scholz --- files/en-us/web/api/performancenavigation/tojson/index.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/files/en-us/web/api/performancenavigation/tojson/index.md b/files/en-us/web/api/performancenavigation/tojson/index.md index 8ec47aaa39fd273..da929d308897bf2 100644 --- a/files/en-us/web/api/performancenavigation/tojson/index.md +++ b/files/en-us/web/api/performancenavigation/tojson/index.md @@ -11,7 +11,10 @@ tags: browser-compat: api.PerformanceNavigation.toJSON --- -{{APIRef("Performance API")}} +{{APIRef("Performance API")}} {{deprecated_header}} + + > **Warning:** This interface of this property is deprecated in the [Navigation Timing Level 2 specification](https://w3c.github.io/navigation-timing/#obsolete). Please use the {{domxref("PerformanceNavigationTiming")}} + > interface instead. The **`toJSON()`** method of the {{domxref("PerformanceNavigation")}} interface is a {{Glossary("Serialization","serializer")}}; it returns a JSON representation of the {{domxref("PerformanceNavigation")}} object. From f7e803a8fbde2c34bbcf511df6dfdc9b8a3ab87a Mon Sep 17 00:00:00 2001 From: Jean-Yves Perrier Date: Fri, 3 Feb 2023 13:27:44 +0100 Subject: [PATCH 5/5] Update files/en-us/web/api/performancenavigation/index.md Co-authored-by: Florian Scholz --- files/en-us/web/api/performancenavigation/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/en-us/web/api/performancenavigation/index.md b/files/en-us/web/api/performancenavigation/index.md index 101587e5567ffa1..4600e3f6b563f1f 100644 --- a/files/en-us/web/api/performancenavigation/index.md +++ b/files/en-us/web/api/performancenavigation/index.md @@ -50,7 +50,7 @@ _The `PerformanceNavigation` interface doesn't inherit any properties._ _The `Performance` interface doesn't inherit any methods._ -- {{deprecated_inline}} {{domxref("PerformanceNavigation.toJSON()")}} +- {{domxref("PerformanceNavigation.toJSON()")}} {{deprecated_inline}} - : A {{Glossary("Serialization","serializer")}} returning a JSON object representing the `PerformanceNavigation` object. ## Specifications