From 6b79bdd8a1d37647e39f48f85708ae8ae663ff6d Mon Sep 17 00:00:00 2001 From: Jan Klass Date: Sun, 8 Sep 2024 13:43:14 +0200 Subject: [PATCH 1/2] Fix URL base parameter description typo --- files/en-us/web/api/url/url/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/en-us/web/api/url/url/index.md b/files/en-us/web/api/url/url/index.md index 631ab7b9ba114cc..52404aea5c08f58 100644 --- a/files/en-us/web/api/url/url/index.md +++ b/files/en-us/web/api/url/url/index.md @@ -30,7 +30,7 @@ new URL(url, base) - : A string representing the base URL to use in cases where `url` is a relative reference. If not specified, it defaults to `undefined`. - When specify a `base` URL, the resolved URL is not simply a concatenation of `url` and `base`. + When specifying a `base` URL, the resolved URL is not simply a concatenation of `url` and `base`. Relative references to the parent and current directory are resolved are relative to the current directory of the `base` URL, which includes path segments up until the last forward-slash, but not any after. Relative references to the root are resolved relative to the base origin. For more information see [Resolving relative references to a URL](/en-US/docs/Web/API/URL_API/Resolving_relative_references). From d5b8635d6a4952aef0e006c056bfa087c032aa0c Mon Sep 17 00:00:00 2001 From: Jan Klass Date: Sun, 8 Sep 2024 13:47:20 +0200 Subject: [PATCH 2/2] Improve URL base parameter description --- files/en-us/web/api/url/url/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/en-us/web/api/url/url/index.md b/files/en-us/web/api/url/url/index.md index 52404aea5c08f58..8546dc755600b68 100644 --- a/files/en-us/web/api/url/url/index.md +++ b/files/en-us/web/api/url/url/index.md @@ -30,7 +30,7 @@ new URL(url, base) - : A string representing the base URL to use in cases where `url` is a relative reference. If not specified, it defaults to `undefined`. - When specifying a `base` URL, the resolved URL is not simply a concatenation of `url` and `base`. + When a `base` is specified, the resolved URL is not simply a concatenation of `url` and `base`. Relative references to the parent and current directory are resolved are relative to the current directory of the `base` URL, which includes path segments up until the last forward-slash, but not any after. Relative references to the root are resolved relative to the base origin. For more information see [Resolving relative references to a URL](/en-US/docs/Web/API/URL_API/Resolving_relative_references).