Skip to content

Add trailing-slash example to URL href docs#43018

Merged
Josh-Cena merged 3 commits intomdn:mainfrom
badwriter123:url-href-add-trailing-slash-example
Mar 28, 2026
Merged

Add trailing-slash example to URL href docs#43018
Josh-Cena merged 3 commits intomdn:mainfrom
badwriter123:url-href-add-trailing-slash-example

Conversation

@badwriter123
Copy link
Copy Markdown
Contributor

@badwriter123 badwriter123 commented Feb 5, 2026

Hello,

Fix #43017

For the file -> files/en-us/web/api/url/href/index.md

  1. Added a second example to the URL href docs that shows when the logged URL has a trailing slash (origin-only URLs like https://developer.mozilla.org), and linked to the pathname docs for the full explanation.

Thank you 😊.

@badwriter123 badwriter123 requested a review from a team as a code owner February 5, 2026 05:19
@badwriter123 badwriter123 requested review from wbamberg and removed request for a team February 5, 2026 05:19
@github-actions github-actions bot added Content:WebAPI Web API docs size/s [PR only] 6-50 LoC changed labels Feb 5, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 5, 2026

Preview URLs (1 page)

External URLs (1)

URL: /en-US/docs/Web/API/URL/href
Title: URL: href property

(comment last updated: 2026-03-28 01:16:07)

@Josh-Cena Josh-Cena requested a review from a team as a code owner March 28, 2026 01:14
Copy link
Copy Markdown
Member

@Josh-Cena Josh-Cena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@Josh-Cena Josh-Cena merged commit 55ed83b into mdn:main Mar 28, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:WebAPI Web API docs size/s [PR only] 6-50 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mention URL.href adds a trailing slash if pathname is empty

3 participants