From 3259619d53c14029d6e1172256825f6d9b74bcf0 Mon Sep 17 00:00:00 2001 From: Abin K Paul <36098125+abinpaul1@users.noreply.github.com> Date: Tue, 9 Aug 2022 19:17:40 +0530 Subject: [PATCH 1/9] renderBlockingStatus in Resource Timing --- .../api/performanceresourcetiming/index.md | 2 + .../renderBlockingStatus/index.md | 47 +++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 files/en-us/web/api/performanceresourcetiming/renderBlockingStatus/index.md diff --git a/files/en-us/web/api/performanceresourcetiming/index.md b/files/en-us/web/api/performanceresourcetiming/index.md index 0656d53ed4e32c3..01eba90c9acbf7b 100644 --- a/files/en-us/web/api/performanceresourcetiming/index.md +++ b/files/en-us/web/api/performanceresourcetiming/index.md @@ -70,6 +70,8 @@ The interface also supports the following properties which are listed in the ord - : A `number` that is the size (in octets) received from the fetch (HTTP or cache) of the _message body_, after removing any applied content-codings. - {{domxref('PerformanceResourceTiming.serverTiming')}} {{readonlyInline}} - : An array of {{domxref("PerformanceServerTiming")}} entries containing server timing metrics. +- {{domxref('PerformanceResourceTiming.renderBlockingStatus')}} {{readonlyInline}} + - : A string representing the render-blocking status. Must be: "`blocking`" or "`non-blocking`". ## Methods diff --git a/files/en-us/web/api/performanceresourcetiming/renderBlockingStatus/index.md b/files/en-us/web/api/performanceresourcetiming/renderBlockingStatus/index.md new file mode 100644 index 000000000000000..2b9fe027542bc6b --- /dev/null +++ b/files/en-us/web/api/performanceresourcetiming/renderBlockingStatus/index.md @@ -0,0 +1,47 @@ +--- +title: PerformanceResourceTiming.renderBlockingStatus +slug: Web/API/PerformanceResourceTiming/renderBlockingStatus +page-type: web-api-instance-property +tags: + - API + - Property + - Reference + - Web Performance +browser-compat: api.PerformanceResourceTiming.renderBlockingStatus +--- +{{APIRef("Resource Timing API")}} + +The **`renderBlockingStatus`** read-only property returns the render-blocking +nature of the resource. + +## Value + +A string containing one of the following values: + +- `"blocking"` + - : The resource might potentially block rendering. +- `"non-blocking"` + - : The resource does not block rendering. + +## Examples + +In the following example, we print out the {{domxref("PerformanceEntry.name","name")}} of +resources which are potentially render-blocking. +```js +function print_renderBlocking_resources() { + const p = performance.getEntriesByType("resource"); + for (let i=0; i < p.length; i++) { + if (p[i].renderBlockingStatus==="blocking"){ + console.log(p[i].name); + } + } +} +``` + +## Specifications + +{{Specifications}} + +## Browser compatibility + +{{Compat}} From cf2790e5a3e8d88326793116b99da178bbd84bd8 Mon Sep 17 00:00:00 2001 From: Abin K Paul Date: Fri, 23 Sep 2022 20:09:16 +0530 Subject: [PATCH 2/9] Fix formatting and redirects --- files/en-us/_redirects.txt | 1 + files/en-us/web/api/performanceresourcetiming/index.md | 2 +- .../api/performanceresourcetiming/renderBlockingStatus/index.md | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/files/en-us/_redirects.txt b/files/en-us/_redirects.txt index 19ad518c7f44edb..22bef1910fe86b8 100644 --- a/files/en-us/_redirects.txt +++ b/files/en-us/_redirects.txt @@ -9186,6 +9186,7 @@ /en-US/docs/Web/API/PerformanceEntry/nextHopProtocol /en-US/docs/Web/API/PerformanceResourceTiming/nextHopProtocol /en-US/docs/Web/API/PerformanceEntry/redirectEnd /en-US/docs/Web/API/PerformanceResourceTiming/redirectEnd /en-US/docs/Web/API/PerformanceEntry/redirectStart /en-US/docs/Web/API/PerformanceResourceTiming/redirectStart +/en-US/docs/Web/API/PerformanceEntry/renderBlockingStatus /en-US/docs/Web/API/PerformanceResourceTiming/renderBlockingStatus /en-US/docs/Web/API/PerformanceEntry/requestStart /en-US/docs/Web/API/PerformanceResourceTiming/requestStart /en-US/docs/Web/API/PerformanceEntry/responseEnd /en-US/docs/Web/API/PerformanceResourceTiming/responseEnd /en-US/docs/Web/API/PerformanceEntry/responseStart /en-US/docs/Web/API/PerformanceResourceTiming/responseStart diff --git a/files/en-us/web/api/performanceresourcetiming/index.md b/files/en-us/web/api/performanceresourcetiming/index.md index daa0f7ac90a0b5a..ca1b56955219cf4 100644 --- a/files/en-us/web/api/performanceresourcetiming/index.md +++ b/files/en-us/web/api/performanceresourcetiming/index.md @@ -71,7 +71,7 @@ The interface also supports the following properties which are listed in the ord - : A `number` that is the size (in octets) received from the fetch (HTTP or cache) of the _message body_, after removing any applied content-codings. - {{domxref('PerformanceResourceTiming.serverTiming')}} {{ReadOnlyInline}} - : An array of {{domxref("PerformanceServerTiming")}} entries containing server timing metrics. -- {{domxref('PerformanceResourceTiming.renderBlockingStatus')}} {{readonlyInline}} +- {{domxref('PerformanceResourceTiming.renderBlockingStatus')}} {{ReadOnlyInline}} - : A string representing the render-blocking status. Must be: "`blocking`" or "`non-blocking`". ## Methods diff --git a/files/en-us/web/api/performanceresourcetiming/renderBlockingStatus/index.md b/files/en-us/web/api/performanceresourcetiming/renderBlockingStatus/index.md index 2b9fe027542bc6b..f5e8c80dc666520 100644 --- a/files/en-us/web/api/performanceresourcetiming/renderBlockingStatus/index.md +++ b/files/en-us/web/api/performanceresourcetiming/renderBlockingStatus/index.md @@ -9,6 +9,7 @@ tags: - Web Performance browser-compat: api.PerformanceResourceTiming.renderBlockingStatus --- + {{APIRef("Resource Timing API")}} The **`renderBlockingStatus`** read-only property returns the render-blocking @@ -27,6 +28,7 @@ A string containing one of the following values: In the following example, we print out the {{domxref("PerformanceEntry.name","name")}} of resources which are potentially render-blocking. + ```js function print_renderBlocking_resources() { const p = performance.getEntriesByType("resource"); From a943fa4e90b64930681ef1ec7376c88dea995045 Mon Sep 17 00:00:00 2001 From: Abin K Paul Date: Fri, 23 Sep 2022 20:35:31 +0530 Subject: [PATCH 3/9] Remove manual change in redirects --- files/en-us/_redirects.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/files/en-us/_redirects.txt b/files/en-us/_redirects.txt index 22bef1910fe86b8..19ad518c7f44edb 100644 --- a/files/en-us/_redirects.txt +++ b/files/en-us/_redirects.txt @@ -9186,7 +9186,6 @@ /en-US/docs/Web/API/PerformanceEntry/nextHopProtocol /en-US/docs/Web/API/PerformanceResourceTiming/nextHopProtocol /en-US/docs/Web/API/PerformanceEntry/redirectEnd /en-US/docs/Web/API/PerformanceResourceTiming/redirectEnd /en-US/docs/Web/API/PerformanceEntry/redirectStart /en-US/docs/Web/API/PerformanceResourceTiming/redirectStart -/en-US/docs/Web/API/PerformanceEntry/renderBlockingStatus /en-US/docs/Web/API/PerformanceResourceTiming/renderBlockingStatus /en-US/docs/Web/API/PerformanceEntry/requestStart /en-US/docs/Web/API/PerformanceResourceTiming/requestStart /en-US/docs/Web/API/PerformanceEntry/responseEnd /en-US/docs/Web/API/PerformanceResourceTiming/responseEnd /en-US/docs/Web/API/PerformanceEntry/responseStart /en-US/docs/Web/API/PerformanceResourceTiming/responseStart From ac79f03bc5458c9f16d93c3fafd0979136736105 Mon Sep 17 00:00:00 2001 From: Brian Thomas Smith Date: Mon, 17 Oct 2022 14:22:49 +0200 Subject: [PATCH 4/9] Rename files/en-us/web/api/performanceresourcetiming/renderBlockingStatus/index.md to files/en-us/web/api/performanceresourcetiming/renderblockingstatus/index.md --- .../{renderBlockingStatus => renderblockingstatus}/index.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename files/en-us/web/api/performanceresourcetiming/{renderBlockingStatus => renderblockingstatus}/index.md (100%) diff --git a/files/en-us/web/api/performanceresourcetiming/renderBlockingStatus/index.md b/files/en-us/web/api/performanceresourcetiming/renderblockingstatus/index.md similarity index 100% rename from files/en-us/web/api/performanceresourcetiming/renderBlockingStatus/index.md rename to files/en-us/web/api/performanceresourcetiming/renderblockingstatus/index.md From 2062dcfa9914eb6de097f31ce29aa54cbb2d1283 Mon Sep 17 00:00:00 2001 From: Abin K Paul Date: Tue, 18 Oct 2022 16:49:31 +0530 Subject: [PATCH 5/9] Change code style and description --- .../renderblockingstatus/index.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/files/en-us/web/api/performanceresourcetiming/renderblockingstatus/index.md b/files/en-us/web/api/performanceresourcetiming/renderblockingstatus/index.md index f5e8c80dc666520..8b89832017bf284 100644 --- a/files/en-us/web/api/performanceresourcetiming/renderblockingstatus/index.md +++ b/files/en-us/web/api/performanceresourcetiming/renderblockingstatus/index.md @@ -12,8 +12,9 @@ browser-compat: api.PerformanceResourceTiming.renderBlockingStatus {{APIRef("Resource Timing API")}} +Render-blocking resources are static files such as fonts, CSS, and JavaScript files, that block or delay the browser from rendering page content to the screen. The **`renderBlockingStatus`** read-only property returns the render-blocking -nature of the resource. +nature of the resource. This eliminates the need to rely on complex heurestics to identify render-blocking resources. ## Value @@ -30,13 +31,13 @@ In the following example, we print out the {{domxref("PerformanceEntry.name","na resources which are potentially render-blocking. ```js -function print_renderBlocking_resources() { - const p = performance.getEntriesByType("resource"); - for (let i=0; i < p.length; i++) { - if (p[i].renderBlockingStatus==="blocking"){ - console.log(p[i].name); +function printRenderBlockingResources() { + const entries = performance.getEntriesByType("resource"); + for (const entry of entries) { + if (entry.renderBlockingStatus==="blocking") { + console.log(entry.name); } - } + }; } ``` From 46b5db832b9a5a71c142127e6c5a668d96520294 Mon Sep 17 00:00:00 2001 From: Brian Thomas Smith Date: Tue, 18 Oct 2022 17:42:30 +0200 Subject: [PATCH 6/9] Update index.md --- .../performanceresourcetiming/renderblockingstatus/index.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/files/en-us/web/api/performanceresourcetiming/renderblockingstatus/index.md b/files/en-us/web/api/performanceresourcetiming/renderblockingstatus/index.md index 8b89832017bf284..70e71a58eba8942 100644 --- a/files/en-us/web/api/performanceresourcetiming/renderblockingstatus/index.md +++ b/files/en-us/web/api/performanceresourcetiming/renderblockingstatus/index.md @@ -34,11 +34,13 @@ resources which are potentially render-blocking. function printRenderBlockingResources() { const entries = performance.getEntriesByType("resource"); for (const entry of entries) { - if (entry.renderBlockingStatus==="blocking") { + if (entry.renderBlockingStatus === "blocking") { console.log(entry.name); } - }; + } } + +printRenderBlockingResources(); ``` ## Specifications From 7471f2df8a92426024f430a3fcdb33f06e40f18e Mon Sep 17 00:00:00 2001 From: Brian Thomas Smith Date: Wed, 2 Nov 2022 11:06:27 +0100 Subject: [PATCH 7/9] Minor formatting / typo fix --- .../renderblockingstatus/index.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/files/en-us/web/api/performanceresourcetiming/renderblockingstatus/index.md b/files/en-us/web/api/performanceresourcetiming/renderblockingstatus/index.md index 70e71a58eba8942..cd5bab9ff4bc51f 100644 --- a/files/en-us/web/api/performanceresourcetiming/renderblockingstatus/index.md +++ b/files/en-us/web/api/performanceresourcetiming/renderblockingstatus/index.md @@ -12,9 +12,9 @@ browser-compat: api.PerformanceResourceTiming.renderBlockingStatus {{APIRef("Resource Timing API")}} -Render-blocking resources are static files such as fonts, CSS, and JavaScript files, that block or delay the browser from rendering page content to the screen. -The **`renderBlockingStatus`** read-only property returns the render-blocking -nature of the resource. This eliminates the need to rely on complex heurestics to identify render-blocking resources. +Render-blocking resources are static files, such as fonts, CSS, and JavaScript that block or delay the browser from rendering page content to the screen. +The **`renderBlockingStatus`** read-only property returns the render-blocking nature of the resource. +This eliminates the need to rely on complex heuristics to identify render-blocking resources. ## Value @@ -27,8 +27,7 @@ A string containing one of the following values: ## Examples -In the following example, we print out the {{domxref("PerformanceEntry.name","name")}} of -resources which are potentially render-blocking. +In the following example, we print out the {{domxref("PerformanceEntry.name","name")}} of resources which are potentially render-blocking. ```js function printRenderBlockingResources() { From 82527215aced8eb7a1116b4634175d0f71ed3d2a Mon Sep 17 00:00:00 2001 From: Brian Thomas Smith Date: Wed, 2 Nov 2022 11:29:23 +0100 Subject: [PATCH 8/9] Increase max fetch depth for changed-files action --- .github/workflows/pr-check_markdownlint.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pr-check_markdownlint.yml b/.github/workflows/pr-check_markdownlint.yml index 5f2793fa7f62802..7731112d122e42f 100644 --- a/.github/workflows/pr-check_markdownlint.yml +++ b/.github/workflows/pr-check_markdownlint.yml @@ -20,6 +20,7 @@ jobs: with: files: | **/*.md + max_fetch_depth: "180" - name: Setup Node.js environment uses: actions/setup-node@v3 From 205c750d03f1ccc8e5d2a9a79adae1752365e398 Mon Sep 17 00:00:00 2001 From: Brian Thomas Smith Date: Wed, 2 Nov 2022 11:41:05 +0100 Subject: [PATCH 9/9] Revert CI changes --- .github/workflows/pr-check_markdownlint.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/pr-check_markdownlint.yml b/.github/workflows/pr-check_markdownlint.yml index 7731112d122e42f..5f2793fa7f62802 100644 --- a/.github/workflows/pr-check_markdownlint.yml +++ b/.github/workflows/pr-check_markdownlint.yml @@ -20,7 +20,6 @@ jobs: with: files: | **/*.md - max_fetch_depth: "180" - name: Setup Node.js environment uses: actions/setup-node@v3