diff --git a/Libraries/LibURL/Pattern/Init.h b/Libraries/LibURL/Pattern/Init.h new file mode 100644 index 0000000000..19c0a4d2e6 --- /dev/null +++ b/Libraries/LibURL/Pattern/Init.h @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2025, Shannon Booth + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#pragma once + +#include +#include + +namespace URL::Pattern { + +// https://urlpattern.spec.whatwg.org/#dictdef-urlpatterninit +struct Init { + Optional protocol; + Optional username; + Optional password; + Optional hostname; + Optional port; + Optional pathname; + Optional search; + Optional hash; + Optional base_url; +}; + +} diff --git a/Libraries/LibURL/Pattern/Pattern.h b/Libraries/LibURL/Pattern/Pattern.h new file mode 100644 index 0000000000..7378517a92 --- /dev/null +++ b/Libraries/LibURL/Pattern/Pattern.h @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2025, Shannon Booth + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#pragma once + +#include +#include + +namespace URL::Pattern { + +// https://urlpattern.spec.whatwg.org/#typedefdef-urlpatterninput +using Input = Variant; + +// https://urlpattern.spec.whatwg.org/#dictdef-urlpatternoptions +struct Options { + bool ignore_case { false }; +}; + +}