title: URLSearchParams fails to get first parameter when '#' is in url
body: <p>This seems like a bug in this API, though I don't know where to report it. So I am posting here for help. Mozilla docs here <a href="https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams" rel="noreferrer">URLSearchParams</a> </p>
  
  <p>If <code>window.location.href</code> contains a <code>#</code> then <code>URLSearchParams.get</code> fails to retrieve the first search parameter</p>
  
  <pre><code>const location = 'http://localhost:3000/path?referrer=https://google.com';
  const myURL = new URL(location).searchParams.get('referrer')
  // myURL === 'https://google.com
  
  // in one line:
  (new URL('http://localhost:3000/path?referrer=https://google.com')).searchParams.get('referrer')
  </code></pre>
  
  <p>But this same example slightly tweaking the window location will fail</p>
  
  <pre><code>const location = 'http://localhost:3000/#/path?referrer=https://google.com';
  const myURL = new URL(location).searchParams.get('referrer')
  // myURL === null
  
  // in one line
  (new URL('http://localhost:3000/#/path?referrer=https://google.com')).searchParams.get('referrer')
  </code></pre>
  
  <p>This example is using <code>new URL(location).searchParams.get</code> but will yield the exact same functionality if you tweak it to using <code>new URLSearchParams(...).get</code></p>