| <body> |
| <script> |
| document.body.offsetWidth; |
| |
| internals.startTrackingRepaints(); |
| let initialRects; |
| setTimeout(() => { |
| initialRects = internals.repaintRectsAsText(); |
| internals.stopTrackingRepaints(); |
| internals.startTrackingRepaints(); |
| }, 0); |
| |
| document.body.onload = () => { |
| let finalRects = internals.repaintRectsAsText(); |
| internals.stopTrackingRepaints(); |
| document.body.innerHTML += `<p> |
| Before stylesheet load: ${initialRects}<br> |
| After stylesheet load: ${finalRects}<br> |
| </p>`; |
| }; |
| </script> |
| <div style="width:100px; height:100px; background-color:green"></div> |
| <link rel="stylesheet" href="resources/delayed-css.py?delay=300"> |
| <div class=delayed style="width:100px; height:100px; background-color:red"></div> |