1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 06:07:44 +00:00

LibWeb: Implement performance.mark and performance.clearMarks

This commit is contained in:
Luke Wilde 2023-03-23 17:07:52 +00:00 committed by Linus Groh
parent 89ebef9730
commit cbe0901706
13 changed files with 341 additions and 0 deletions

View file

@ -9,6 +9,7 @@
#include <LibCore/ElapsedTimer.h>
#include <LibWeb/DOM/EventTarget.h>
#include <LibWeb/UserTiming/PerformanceMark.h>
namespace Web::HighResolutionTime {
@ -23,6 +24,9 @@ public:
JS::GCPtr<NavigationTiming::PerformanceTiming> timing();
WebIDL::ExceptionOr<JS::NonnullGCPtr<UserTiming::PerformanceMark>> mark(String const& mark_name, UserTiming::PerformanceMarkOptions const& mark_options = {});
void clear_marks(Optional<String> mark_name);
WebIDL::ExceptionOr<Vector<JS::Handle<PerformanceTimeline::PerformanceEntry>>> get_entries() const;
WebIDL::ExceptionOr<Vector<JS::Handle<PerformanceTimeline::PerformanceEntry>>> get_entries_by_type(String const& type) const;
WebIDL::ExceptionOr<Vector<JS::Handle<PerformanceTimeline::PerformanceEntry>>> get_entries_by_name(String const& name, Optional<String> type) const;