Please doc unexpected behavior of the URL.host
setter
#37834
Labels
area: URL/URLPattern
Content:WebAPI
Web API docs
help wanted
If you know something about this topic, we would love your help!
MDN URL
https://developer.mozilla.org/en-US/docs/Web/API/URL/URL
What specific section or headline is this issue about?
The URL.host property.
What information was incorrect, unhelpful, or incomplete?
According to https://url.spec.whatwg.org/#dom-url-host,
What did you expect to see?
I'd expect this to be documented on the
host
property.This is a non-intuitive behavior, especially when setting
host
from aHost
orX-Forwarded-Host
header. Especially given that.hostname
exists, which would seem to be the way to update the hostname without updating the port.Do you have any supporting links, references, or citations?
Yep!
https://url.spec.whatwg.org/#dom-url-host
Do you have anything more you want to share?
Thanks for MDN! ❤️
I'd make the PR myself, but I started reading your CONTRIBUTING.md and it's a bit long/involved for me to take on for this small of a change, so hopefully someone who already has all of that loaded into their head can pick this up. 😊
The text was updated successfully, but these errors were encountered: