LibWeb: Set navigation start time when creating a new Document

This currently uses a non spec-compliant property on the Response
object, which represents the time that the Response was created.

Setting this value allows `Performance.timeOrigin` to return a
reasonable value.
This commit is contained in:
Tim Ledbetter 2025-01-24 03:28:54 +00:00 committed by Alexander Kalenik
commit a8904451ff
Notes: github-actions[bot] 2025-01-27 13:54:49 +00:00
2 changed files with 8 additions and 2 deletions

View file

@ -125,6 +125,7 @@ public:
// Non-standard
[[nodiscard]] Optional<StringView> network_error_message() const;
MonotonicTime response_time() const { return m_response_time; }
protected:
explicit Response(GC::Ref<HeaderList>);