mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2026-01-04 16:51:19 +00:00
Fixed ESLint error
This commit is contained in:
@@ -313,19 +313,16 @@ export default class Explorer {
|
|||||||
// Try to navigate to VS Code protocol
|
// Try to navigate to VS Code protocol
|
||||||
try {
|
try {
|
||||||
// Listen for blur event which might indicate app was launched
|
// Listen for blur event which might indicate app was launched
|
||||||
window.addEventListener(
|
const onBlur = () => {
|
||||||
"blur",
|
clearTimeout(timeoutId);
|
||||||
function onBlur() {
|
window.removeEventListener("blur", onBlur);
|
||||||
clearTimeout(timeoutId);
|
if (document.body.contains(iframe)) {
|
||||||
window.removeEventListener("blur", onBlur);
|
document.body.removeChild(iframe);
|
||||||
if (document.body.contains(iframe)) {
|
}
|
||||||
document.body.removeChild(iframe);
|
// Window lost focus, likely because VS Code opened
|
||||||
}
|
resolve(true);
|
||||||
// Window lost focus, likely because VS Code opened
|
};
|
||||||
resolve(true);
|
window.addEventListener("blur", onBlur, { once: true });
|
||||||
},
|
|
||||||
{ once: true },
|
|
||||||
);
|
|
||||||
|
|
||||||
// Navigate iframe to the VSCode URL
|
// Navigate iframe to the VSCode URL
|
||||||
iframe.src = vscodeUrl;
|
iframe.src = vscodeUrl;
|
||||||
|
|||||||
Reference in New Issue
Block a user