- From: Aditya Giridharan <notifications@github.com>
- Date: Mon, 23 Mar 2020 04:17:49 -0700
- To: whatwg/url <url@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Monday, 23 March 2020 11:18:01 UTC
When I create a URL object, this works: `new URL("https://google.com")` but this doesn't: `new URL("google.com")` because it throws a **TypeError** `Failed to construct URL: Invalid URL` I presume this is because of the missing protocol. But, if I create a URL object with a valid URL: `urlObj = new URL("https://google.com")` And then modify the internal URL string: `urlObj.href = "abcd"` It succeeds and I now have a URL object with a string that is definitely not a valid URL. Is this by design, or can it be fixed? -- 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/470
Received on Monday, 23 March 2020 11:18:01 UTC