mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
Previously, we fired the load event immediately, without waiting for anything. This was good for not timing out, but bad for anything that wanted to wait for the load to complete. CSSStyleSheet now maintains a list of critical subresources, and waits for all of them to complete before it then tells its owner that it is ready. "Complete" here means the network request completed with or without an error. This is done by having those subresources (just `@import` for now) notify their style sheet when they complete. This then propagates up as an `@import` tells its style sheet, which then would tell its parent `@import` if it had one. There are other subresources we should wait for (specifically fonts and background images) but this commit just adds `@import` as a first step.
2 lines
42 B
Plaintext
2 lines
42 B
Plaintext
Target's background color: rgb(0, 255, 0)
|