From 229377b045abe333866a561bb4b71795b5d2d9ec Mon Sep 17 00:00:00 2001 From: XadillaX Date: Mon, 23 Aug 2021 19:21:44 +0800 Subject: [PATCH] f --- lib/internal/url.js | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/lib/internal/url.js b/lib/internal/url.js index e2b2a3cd506b99..30b6701055f20d 100644 --- a/lib/internal/url.js +++ b/lib/internal/url.js @@ -621,17 +621,9 @@ function isURLThis(self) { } class URL { - constructor(input) { + constructor(input, base = undefined) { // toUSVString is not needed. input = `${input}`; - - // idlharness.any.js needs constructor's length to be 1, so there should be - // only one argument `input`. We get the second argument `base` from - // `arguments` object. - let base; - if (arguments.length >= 2) { - base = arguments[1]; - } let base_context; if (base !== undefined) { base_context = new URL(base)[context];