mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-25 04:22:50 +00:00
LibWeb: Use DocumentLoadTimingInfo values in PerformanceTiming interface
This commit is contained in:
parent
f8b8c9c4a4
commit
e03fec2a15
Notes:
github-actions[bot]
2025-01-11 10:12:48 +00:00
Author: https://github.com/tcl3
Commit: e03fec2a15
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3156
7 changed files with 481 additions and 7 deletions
|
@ -24,4 +24,13 @@ void PerformanceTiming::initialize(JS::Realm& realm)
|
|||
WEB_SET_PROTOTYPE_FOR_INTERFACE(PerformanceTiming);
|
||||
}
|
||||
|
||||
DOM::DocumentLoadTimingInfo const& PerformanceTiming::document_load_timing_info() const
|
||||
{
|
||||
auto& global_object = HTML::relevant_global_object(*this);
|
||||
VERIFY(is<HTML::Window>(global_object));
|
||||
auto& window = static_cast<HTML::Window&>(global_object);
|
||||
auto document = window.document();
|
||||
return document->load_timing_info();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue