mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 15:45:25 +00:00
LibWeb: Implement performance.now()
This patch introduces the HighResolutionTime namespace which is home to the Performance object (exposed via window.performance) performance.now() is currently the only function, and it returns the number of milliseconds since the window object was constructed. :^)
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/DOM/Timer.h>
|
||||
#include <LibWeb/DOM/Window.h>
|
||||
#include <LibWeb/HighResolutionTime/Performance.h>
|
||||
#include <LibWeb/InProcessWebView.h>
|
||||
#include <LibWeb/Page/Frame.h>
|
||||
|
||||
@@ -42,6 +43,7 @@ NonnullRefPtr<Window> Window::create_with_document(Document& document)
|
||||
|
||||
Window::Window(Document& document)
|
||||
: m_document(document)
|
||||
, m_performance(make<HighResolutionTime::Performance>(*this))
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user