Commit 280d61d
committed
fix: use renderBlockingStatus to avoid false positives in Critical CSS Detection
Fixes #64
The media/onload deferral pattern (media="print" onload="this.media='all'")
was incorrectly flagged as render-blocking. By the time the snippet runs,
the onload handler has already mutated the media attribute to "all", making
the DOM-based check unreliable.
Now uses PerformanceResourceTiming.renderBlockingStatus (Chrome 107+) as
the primary signal — it reflects actual render-blocking during page load.
The DOM heuristic is kept as a fallback with a comment noting its limitation.1 parent 98874e2 commit 280d61d
3 files changed
Lines changed: 22 additions & 12 deletions
File tree
- .claude/skills/webperf-loading/scripts
- skills/webperf-loading/scripts
- snippets/Loading
Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
36 | 46 | | |
37 | 47 | | |
38 | 48 | | |
| |||
0 commit comments