function crowdQuery (domain, path) {
  let data = {
    domain: domain,
    path: path
  }
  //ff + first 10 characters of SHA256 of fastforward to prevent collisions
  document.dispatchEvent(
    new CustomEvent('ff53054c0e13_crowdQuery', { detail: data })
  )
  return new Promise((resolve, reject) => {
    const timeout = setTimeout(() => {
      reject(new Error('Timeout: crowd response not received'));
    }, 10000); //10 sec timeout

    document.addEventListener('ff53054c0e13_crowdResponse', function (event) {
      clearTimeout(timeout)
      resolve(event.detail)
    })
  })
}
Dispatch a crowdQuery event.
@param {string} domain - The domain to include in the event detail.
Include subdomain if not www.
@param {string} path - The path to include in the event detail.
Query string also goes here like a?b=c. Drop the first slash 'a' not '/a'
@returns {Promise<string>} Promise will resolve into the path