1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 13:57:35 +00:00

LibWeb: Stub out the PerformanceTiming object from Navigation Timing

Just have all the timing functions return 0 for now.

We can now run the Shynet JS on https://linus.dev/ although the XHR
is rejected by our same-origin policy.
This commit is contained in:
Andreas Kling 2021-01-18 15:06:13 +01:00
parent c99e35485a
commit 9e45594dc8
10 changed files with 176 additions and 2 deletions

View file

@ -36,6 +36,7 @@ namespace Web::HighResolutionTime {
Performance::Performance(DOM::Window& window)
: DOM::EventTarget(static_cast<Bindings::ScriptExecutionContext&>(window.document()))
, m_window(window)
, m_timing(make<NavigationTiming::PerformanceTiming>(window))
{
m_timer.start();
}