mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-26 19:29:16 +00:00
LibWeb: Use DocumentLoadTimingInfo values in PerformanceTiming interface
This commit is contained in:
committed by
Andreas Kling
parent
f8b8c9c4a4
commit
e03fec2a15
@@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user