(url, base = undefined)
| 1160 | } |
| 1161 | |
| 1162 | static canParse(url, base = undefined) { |
| 1163 | if (arguments.length === 0) { |
| 1164 | throw new ERR_MISSING_ARGS('url'); |
| 1165 | } |
| 1166 | |
| 1167 | url = `${url}`; |
| 1168 | |
| 1169 | if (base !== undefined) { |
| 1170 | return bindingUrl.canParse(url, `${base}`); |
| 1171 | } |
| 1172 | |
| 1173 | // It is important to differentiate the canParse call statements |
| 1174 | // since they resolve into different v8 fast api overloads. |
| 1175 | return bindingUrl.canParse(url); |
| 1176 | } |
| 1177 | } |
| 1178 | |
| 1179 | ObjectDefineProperties(URL.prototype, { |