mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 23:25:20 +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:
@@ -290,7 +290,7 @@ int main(int argc, char** argv)
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (namespace_.is_one_of("DOM", "HTML", "UIEvents")) {
|
||||
if (namespace_.is_one_of("DOM", "HTML", "UIEvents", "HighResolutionTime")) {
|
||||
StringBuilder builder;
|
||||
builder.append(namespace_);
|
||||
builder.append("::");
|
||||
@@ -379,6 +379,8 @@ static void generate_header(const IDL::Interface& interface)
|
||||
out() << "#include <LibWeb/HTML/" << interface.name << ".h>";
|
||||
out() << "#elif __has_include(<LibWeb/UIEvents/" << interface.name << ".h>)";
|
||||
out() << "#include <LibWeb/UIEvents/" << interface.name << ".h>";
|
||||
out() << "#elif __has_include(<LibWeb/HighResolutionTime/" << interface.name << ".h>)";
|
||||
out() << "#include <LibWeb/HighResolutionTime/" << interface.name << ".h>";
|
||||
out() << "#endif";
|
||||
|
||||
if (wrapper_base_class != "Wrapper")
|
||||
|
||||
Reference in New Issue
Block a user