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
commit 9e45594dc8
Notes: sideshowbarker 2024-07-18 23:07:21 +09:00
10 changed files with 176 additions and 2 deletions

View file

@ -198,6 +198,8 @@
#include <LibWeb/Bindings/NodePrototype.h>
#include <LibWeb/Bindings/PerformanceConstructor.h>
#include <LibWeb/Bindings/PerformancePrototype.h>
#include <LibWeb/Bindings/PerformanceTimingConstructor.h>
#include <LibWeb/Bindings/PerformanceTimingPrototype.h>
#include <LibWeb/Bindings/SVGElementConstructor.h>
#include <LibWeb/Bindings/SVGElementPrototype.h>
#include <LibWeb/Bindings/SVGGeometryElementConstructor.h>
@ -308,6 +310,7 @@
ADD_WINDOW_OBJECT_INTERFACE(MouseEvent) \
ADD_WINDOW_OBJECT_INTERFACE(Node) \
ADD_WINDOW_OBJECT_INTERFACE(Performance) \
ADD_WINDOW_OBJECT_INTERFACE(PerformanceTiming) \
ADD_WINDOW_OBJECT_INTERFACE(ShadowRoot) \
ADD_WINDOW_OBJECT_INTERFACE(SubmitEvent) \
ADD_WINDOW_OBJECT_INTERFACE(SVGElement) \