Skip to content

armgit / mimik

Public Imported from GitHub
0

🎬 A browser extension and desktop app that turns your clicks into step-by-step guides with annotated screenshots πŸ“–

459 B
Raw Blame
import { logger } from '@mimik/core/logger';
import { hasOffscreenDocument } from './has-offscreen-document';
import { offscreenApi } from './offscreen-api';

export async function closeOffscreenDocument(): Promise<void> {
  const api = offscreenApi();
  if (!api) return;
  if (!(await hasOffscreenDocument())) return;
  try {
    await api.closeDocument();
  } catch (error) {
    logger.error('voice: failed to close the offscreen document', error);
  }
}