summaryrefslogtreecommitdiff
path: root/ext/url/01_urlpattern.js
diff options
context:
space:
mode:
authorLeo Kettmeir <crowlkats@toaxl.com>2023-05-01 12:47:13 +0200
committerGitHub <noreply@github.com>2023-05-01 10:47:13 +0000
commitb31cf9fde6ad5398c20370c136695db77df6beeb (patch)
tree23ef5cd5d6e9342abefdc37332cc12d9bce3f245 /ext/url/01_urlpattern.js
parentd856bfd336137e1bcf81a0db9e8ad2b418ba711e (diff)
refactor(webidl): move prefix & context out of converters options bag (#18931)
Diffstat (limited to 'ext/url/01_urlpattern.js')
-rw-r--r--ext/url/01_urlpattern.js36
1 files changed, 9 insertions, 27 deletions
diff --git a/ext/url/01_urlpattern.js b/ext/url/01_urlpattern.js
index 1ed02f8d3..3c08bc1b8 100644
--- a/ext/url/01_urlpattern.js
+++ b/ext/url/01_urlpattern.js
@@ -56,15 +56,9 @@ class URLPattern {
this[webidl.brand] = webidl.brand;
const prefix = "Failed to construct 'URLPattern'";
webidl.requiredArguments(arguments.length, 1, prefix);
- input = webidl.converters.URLPatternInput(input, {
- prefix,
- context: "Argument 1",
- });
+ input = webidl.converters.URLPatternInput(input, prefix, "Argument 1");
if (baseURL !== undefined) {
- baseURL = webidl.converters.USVString(baseURL, {
- prefix,
- context: "Argument 2",
- });
+ baseURL = webidl.converters.USVString(baseURL, prefix, "Argument 2");
}
const components = ops.op_urlpattern_parse(input, baseURL);
@@ -134,15 +128,9 @@ class URLPattern {
webidl.assertBranded(this, URLPatternPrototype);
const prefix = "Failed to execute 'test' on 'URLPattern'";
webidl.requiredArguments(arguments.length, 1, prefix);
- input = webidl.converters.URLPatternInput(input, {
- prefix,
- context: "Argument 1",
- });
+ input = webidl.converters.URLPatternInput(input, prefix, "Argument 1");
if (baseURL !== undefined) {
- baseURL = webidl.converters.USVString(baseURL, {
- prefix,
- context: "Argument 2",
- });
+ baseURL = webidl.converters.USVString(baseURL, prefix, "Argument 2");
}
const res = ops.op_urlpattern_process_match_input(
@@ -175,15 +163,9 @@ class URLPattern {
webidl.assertBranded(this, URLPatternPrototype);
const prefix = "Failed to execute 'exec' on 'URLPattern'";
webidl.requiredArguments(arguments.length, 1, prefix);
- input = webidl.converters.URLPatternInput(input, {
- prefix,
- context: "Argument 1",
- });
+ input = webidl.converters.URLPatternInput(input, prefix, "Argument 1");
if (baseURL !== undefined) {
- baseURL = webidl.converters.USVString(baseURL, {
- prefix,
- context: "Argument 2",
- });
+ baseURL = webidl.converters.USVString(baseURL, prefix, "Argument 2");
}
const res = ops.op_urlpattern_process_match_input(
@@ -258,12 +240,12 @@ webidl.converters.URLPatternInit = webidl
{ key: "baseURL", converter: webidl.converters.USVString },
]);
-webidl.converters["URLPatternInput"] = (V, opts) => {
+webidl.converters["URLPatternInput"] = (V, prefix, context, opts) => {
// Union for (URLPatternInit or USVString)
if (typeof V == "object") {
- return webidl.converters.URLPatternInit(V, opts);
+ return webidl.converters.URLPatternInit(V, prefix, context, opts);
}
- return webidl.converters.USVString(V, opts);
+ return webidl.converters.USVString(V, prefix, context, opts);
};
export { URLPattern };