Skip to content

Commit

Permalink
Merge pull request #492 from jupyterlab/fcollonval-patch-1
Browse files Browse the repository at this point in the history
Add a global flag to test for execution within electron
  • Loading branch information
mbektas authored Sep 8, 2022
2 parents dbc5656 + 928207e commit 43f3f3f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/browser/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,14 @@ function main(): void {
document.getElementById('root')
);
}
declare global {
// eslint-disable-next-line @typescript-eslint/naming-convention
interface Window {
isElectron?: boolean;
}
}

// Flag to test for Electron integration
window.isElectron = true;

window.onload = main;

0 comments on commit 43f3f3f

Please sign in to comment.