static rootDomainsMatch(urlA, urlB) {
    let urlAInfo;
    let urlBInfo;
    try {
      urlAInfo = Util.createOrReturnURL(urlA);
      urlBInfo = Util.createOrReturnURL(urlB);
    } catch (err) {
      return false;
    }

    if (!urlAInfo.hostname || !urlBInfo.hostname) {
      return false;
    }

    // get the string before the tld
    const urlARootDomain = UrlUtils.getRootDomain(urlAInfo);
    const urlBRootDomain = UrlUtils.getRootDomain(urlBInfo);

    return urlARootDomain === urlBRootDomain;
  }
Check if rootDomains matches

@param {string|URL} urlA
@param {string|URL} urlB