diff options
| author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2023-04-12 21:58:57 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-12 19:58:57 +0000 |
| commit | a3c5193a2e7d15bbfac390b220982561376e7322 (patch) | |
| tree | 272620bdfec253f53ad9ddd787afa0139770e069 /ext/url | |
| parent | 9c255b2843b3446c7ac6592eb8e318972eb5f1f8 (diff) | |
refactor(ext/webidl): remove object from 'requiredArguments' (#18674)
This should produce a little less garbage and using an object here
wasn't really required.
---------
Co-authored-by: Aapo Alasuutari <aapo.alasuutari@gmail.com>
Co-authored-by: Leo Kettmeir <crowlkats@toaxl.com>
Diffstat (limited to 'ext/url')
| -rw-r--r-- | ext/url/00_url.js | 32 | ||||
| -rw-r--r-- | ext/url/01_urlpattern.js | 6 |
2 files changed, 19 insertions, 19 deletions
diff --git a/ext/url/00_url.js b/ext/url/00_url.js index 984e487ce..d76366cfa 100644 --- a/ext/url/00_url.js +++ b/ext/url/00_url.js @@ -157,7 +157,7 @@ class URLSearchParams { append(name, value) { webidl.assertBranded(this, URLSearchParamsPrototype); const prefix = "Failed to execute 'append' on 'URLSearchParams'"; - webidl.requiredArguments(arguments.length, 2, { prefix }); + webidl.requiredArguments(arguments.length, 2, prefix); name = webidl.converters.USVString(name, { prefix, context: "Argument 1", @@ -176,7 +176,7 @@ class URLSearchParams { delete(name) { webidl.assertBranded(this, URLSearchParamsPrototype); const prefix = "Failed to execute 'append' on 'URLSearchParams'"; - webidl.requiredArguments(arguments.length, 1, { prefix }); + webidl.requiredArguments(arguments.length, 1, prefix); name = webidl.converters.USVString(name, { prefix, context: "Argument 1", @@ -200,7 +200,7 @@ class URLSearchParams { getAll(name) { webidl.assertBranded(this, URLSearchParamsPrototype); const prefix = "Failed to execute 'getAll' on 'URLSearchParams'"; - webidl.requiredArguments(arguments.length, 1, { prefix }); + webidl.requiredArguments(arguments.length, 1, prefix); name = webidl.converters.USVString(name, { prefix, context: "Argument 1", @@ -223,7 +223,7 @@ class URLSearchParams { get(name) { webidl.assertBranded(this, URLSearchParamsPrototype); const prefix = "Failed to execute 'get' on 'URLSearchParams'"; - webidl.requiredArguments(arguments.length, 1, { prefix }); + webidl.requiredArguments(arguments.length, 1, prefix); name = webidl.converters.USVString(name, { prefix, context: "Argument 1", @@ -245,7 +245,7 @@ class URLSearchParams { has(name) { webidl.assertBranded(this, URLSearchParamsPrototype); const prefix = "Failed to execute 'has' on 'URLSearchParams'"; - webidl.requiredArguments(arguments.length, 1, { prefix }); + webidl.requiredArguments(arguments.length, 1, prefix); name = webidl.converters.USVString(name, { prefix, context: "Argument 1", @@ -260,7 +260,7 @@ class URLSearchParams { set(name, value) { webidl.assertBranded(this, URLSearchParamsPrototype); const prefix = "Failed to execute 'set' on 'URLSearchParams'"; - webidl.requiredArguments(arguments.length, 2, { prefix }); + webidl.requiredArguments(arguments.length, 2, prefix); name = webidl.converters.USVString(name, { prefix, context: "Argument 1", @@ -464,7 +464,7 @@ class URL { set hash(value) { webidl.assertBranded(this, URLPrototype); const prefix = "Failed to set 'hash' on 'URL'"; - webidl.requiredArguments(arguments.length, 1, { prefix }); + webidl.requiredArguments(arguments.length, 1, prefix); value = webidl.converters.DOMString(value, { prefix, context: "Argument 1", @@ -492,7 +492,7 @@ class URL { set host(value) { webidl.assertBranded(this, URLPrototype); const prefix = "Failed to set 'host' on 'URL'"; - webidl.requiredArguments(arguments.length, 1, { prefix }); + webidl.requiredArguments(arguments.length, 1, prefix); value = webidl.converters.DOMString(value, { prefix, context: "Argument 1", @@ -520,7 +520,7 @@ class URL { set hostname(value) { webidl.assertBranded(this, URLPrototype); const prefix = "Failed to set 'hostname' on 'URL'"; - webidl.requiredArguments(arguments.length, 1, { prefix }); + webidl.requiredArguments(arguments.length, 1, prefix); value = webidl.converters.DOMString(value, { prefix, context: "Argument 1", @@ -547,7 +547,7 @@ class URL { set href(value) { webidl.assertBranded(this, URLPrototype); const prefix = "Failed to set 'href' on 'URL'"; - webidl.requiredArguments(arguments.length, 1, { prefix }); + webidl.requiredArguments(arguments.length, 1, prefix); value = webidl.converters.DOMString(value, { prefix, context: "Argument 1", @@ -603,7 +603,7 @@ class URL { set password(value) { webidl.assertBranded(this, URLPrototype); const prefix = "Failed to set 'password' on 'URL'"; - webidl.requiredArguments(arguments.length, 1, { prefix }); + webidl.requiredArguments(arguments.length, 1, prefix); value = webidl.converters.DOMString(value, { prefix, context: "Argument 1", @@ -636,7 +636,7 @@ class URL { set pathname(value) { webidl.assertBranded(this, URLPrototype); const prefix = "Failed to set 'pathname' on 'URL'"; - webidl.requiredArguments(arguments.length, 1, { prefix }); + webidl.requiredArguments(arguments.length, 1, prefix); value = webidl.converters.DOMString(value, { prefix, context: "Argument 1", @@ -671,7 +671,7 @@ class URL { set port(value) { webidl.assertBranded(this, URLPrototype); const prefix = "Failed to set 'port' on 'URL'"; - webidl.requiredArguments(arguments.length, 1, { prefix }); + webidl.requiredArguments(arguments.length, 1, prefix); value = webidl.converters.DOMString(value, { prefix, context: "Argument 1", @@ -699,7 +699,7 @@ class URL { set protocol(value) { webidl.assertBranded(this, URLPrototype); const prefix = "Failed to set 'protocol' on 'URL'"; - webidl.requiredArguments(arguments.length, 1, { prefix }); + webidl.requiredArguments(arguments.length, 1, prefix); value = webidl.converters.DOMString(value, { prefix, context: "Argument 1", @@ -730,7 +730,7 @@ class URL { set search(value) { webidl.assertBranded(this, URLPrototype); const prefix = "Failed to set 'search' on 'URL'"; - webidl.requiredArguments(arguments.length, 1, { prefix }); + webidl.requiredArguments(arguments.length, 1, prefix); value = webidl.converters.DOMString(value, { prefix, context: "Argument 1", @@ -770,7 +770,7 @@ class URL { set username(value) { webidl.assertBranded(this, URLPrototype); const prefix = "Failed to set 'username' on 'URL'"; - webidl.requiredArguments(arguments.length, 1, { prefix }); + webidl.requiredArguments(arguments.length, 1, prefix); value = webidl.converters.DOMString(value, { prefix, context: "Argument 1", diff --git a/ext/url/01_urlpattern.js b/ext/url/01_urlpattern.js index c70b0d4b4..1ed02f8d3 100644 --- a/ext/url/01_urlpattern.js +++ b/ext/url/01_urlpattern.js @@ -55,7 +55,7 @@ class URLPattern { constructor(input, baseURL = undefined) { this[webidl.brand] = webidl.brand; const prefix = "Failed to construct 'URLPattern'"; - webidl.requiredArguments(arguments.length, 1, { prefix }); + webidl.requiredArguments(arguments.length, 1, prefix); input = webidl.converters.URLPatternInput(input, { prefix, context: "Argument 1", @@ -133,7 +133,7 @@ class URLPattern { test(input, baseURL = undefined) { webidl.assertBranded(this, URLPatternPrototype); const prefix = "Failed to execute 'test' on 'URLPattern'"; - webidl.requiredArguments(arguments.length, 1, { prefix }); + webidl.requiredArguments(arguments.length, 1, prefix); input = webidl.converters.URLPatternInput(input, { prefix, context: "Argument 1", @@ -174,7 +174,7 @@ class URLPattern { exec(input, baseURL = undefined) { webidl.assertBranded(this, URLPatternPrototype); const prefix = "Failed to execute 'exec' on 'URLPattern'"; - webidl.requiredArguments(arguments.length, 1, { prefix }); + webidl.requiredArguments(arguments.length, 1, prefix); input = webidl.converters.URLPatternInput(input, { prefix, context: "Argument 1", |
