safelySetBlobHref(elem, blob) {
    if (blob.type !== 'text/html' && blob.type !== 'application/json') {
      throw new Error('Unsupported blob type');
    }
    const href = URL.createObjectURL(blob);
    elem.href = href;
  }
Only create blob URLs for JSON & HTML
@param {HTMLAnchorElement} elem
@param {Blob} blob