2025-01-05 07:33:26 -03:00
|
|
|
typedef (USVString or URLPatternInit) URLPatternInput;
|
|
|
|
|
|
|
|
|
|
// https://urlpattern.spec.whatwg.org/#urlpattern
|
|
|
|
|
[Exposed=(Window,Worker)]
|
|
|
|
|
interface URLPattern {
|
|
|
|
|
constructor(URLPatternInput input, USVString baseURL, optional URLPatternOptions options = {});
|
|
|
|
|
constructor(optional URLPatternInput input = {}, optional URLPatternOptions options = {});
|
|
|
|
|
|
2025-03-01 02:44:31 -03:00
|
|
|
boolean test(optional URLPatternInput input = {}, optional USVString baseURL);
|
2025-01-05 07:33:26 -03:00
|
|
|
|
2025-01-13 08:18:02 -03:00
|
|
|
URLPatternResult? exec(optional URLPatternInput input = {}, optional USVString baseURL);
|
2025-01-05 07:33:26 -03:00
|
|
|
|
2025-02-03 23:25:19 -03:00
|
|
|
readonly attribute USVString protocol;
|
|
|
|
|
readonly attribute USVString username;
|
|
|
|
|
readonly attribute USVString password;
|
|
|
|
|
readonly attribute USVString hostname;
|
|
|
|
|
readonly attribute USVString port;
|
|
|
|
|
readonly attribute USVString pathname;
|
|
|
|
|
readonly attribute USVString search;
|
|
|
|
|
readonly attribute USVString hash;
|
2025-01-05 07:33:26 -03:00
|
|
|
|
2025-02-03 23:25:19 -03:00
|
|
|
readonly attribute boolean hasRegExpGroups;
|
2025-01-05 07:33:26 -03:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// https://urlpattern.spec.whatwg.org/#dictdef-urlpatterninit
|
|
|
|
|
dictionary URLPatternInit {
|
|
|
|
|
USVString protocol;
|
|
|
|
|
USVString username;
|
|
|
|
|
USVString password;
|
|
|
|
|
USVString hostname;
|
|
|
|
|
USVString port;
|
|
|
|
|
USVString pathname;
|
|
|
|
|
USVString search;
|
|
|
|
|
USVString hash;
|
|
|
|
|
USVString baseURL;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// https://urlpattern.spec.whatwg.org/#dictdef-urlpatternoptions
|
|
|
|
|
dictionary URLPatternOptions {
|
|
|
|
|
boolean ignoreCase = false;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// https://urlpattern.spec.whatwg.org/#dictdef-urlpatternresult
|
|
|
|
|
dictionary URLPatternResult {
|
2026-05-24 10:17:18 -03:00
|
|
|
sequence<URLPatternInput> inputs;
|
|
|
|
|
|
|
|
|
|
URLPatternComponentResult protocol;
|
|
|
|
|
URLPatternComponentResult username;
|
|
|
|
|
URLPatternComponentResult password;
|
|
|
|
|
URLPatternComponentResult hostname;
|
|
|
|
|
URLPatternComponentResult port;
|
|
|
|
|
URLPatternComponentResult pathname;
|
|
|
|
|
URLPatternComponentResult search;
|
|
|
|
|
URLPatternComponentResult hash;
|
2025-01-05 07:33:26 -03:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// https://urlpattern.spec.whatwg.org/#dictdef-urlpatterncomponentresult
|
|
|
|
|
dictionary URLPatternComponentResult {
|
2026-05-24 10:17:18 -03:00
|
|
|
USVString input;
|
|
|
|
|
record<USVString, (USVString or undefined)> groups;
|
2025-01-05 07:33:26 -03:00
|
|
|
};
|