diff --git a/Libraries/LibURL/Pattern/Pattern.h b/Libraries/LibURL/Pattern/Pattern.h index 7378517a920..8b367849856 100644 --- a/Libraries/LibURL/Pattern/Pattern.h +++ b/Libraries/LibURL/Pattern/Pattern.h @@ -6,7 +6,10 @@ #pragma once +#include +#include #include +#include #include namespace URL::Pattern { @@ -19,4 +22,24 @@ struct Options { bool ignore_case { false }; }; +// https://urlpattern.spec.whatwg.org/#dictdef-urlpatterncomponentresult +struct ComponentResult { + String input; + OrderedHashMap> groups; +}; + +// https://urlpattern.spec.whatwg.org/#dictdef-urlpatternresult +struct Result { + Vector inputs; + + ComponentResult protocol; + ComponentResult username; + ComponentResult password; + ComponentResult hostname; + ComponentResult port; + ComponentResult pathname; + ComponentResult search; + ComponentResult hash; +}; + }