Re: [whatwg/url] new URL('file://').origin is 'null' (#310)

Am I the only one who thinks it sounds terrible, like a bug, to have any segment be serialized to the literal string `"null"`? Literally any other option seems preferrable, e.g. the empty string or literal `null`. Do we really want JS devs to have to write code like `if (!url.origin || url.origin === 'null')`?
This really breaks the mental model of the properties of the `URL` being "segments" of the input URL that are stitched back together when calling `url.toString()`.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/url/issues/310#issuecomment-429631516

Received on Sunday, 14 October 2018 14:36:53 UTC