mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-28 12:33:35 +01:00
Adding settings to control which schemes simple browser is enabled for
Also adds a setting to enable/disable the focus lock indicator
This commit is contained in:
@@ -37,6 +37,11 @@ window.addEventListener('message', e => {
|
||||
iframe.focus();
|
||||
break;
|
||||
}
|
||||
case 'didChangeFocusLockIndicatorEnabled':
|
||||
{
|
||||
toggleFocusLockIndicatorEnabled(e.data.enabled);
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -79,8 +84,14 @@ onceDocumentLoaded(() => {
|
||||
});
|
||||
|
||||
navigateTo(settings.url);
|
||||
toggleFocusLockIndicatorEnabled(settings.focusLockIndicatorEnabled);
|
||||
|
||||
function navigateTo(url: string): void {
|
||||
iframe.src = url;
|
||||
}
|
||||
});
|
||||
|
||||
function toggleFocusLockIndicatorEnabled(enabled: boolean) {
|
||||
document.body.classList.toggle('enable-focus-lock-indicator', enabled);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user