fix: clarify browser application guidance

This commit is contained in:
vorotamoroz
2026-07-30 05:53:42 +00:00
parent d4994fdd05
commit b21c3114e5
5 changed files with 180 additions and 13 deletions
@@ -194,11 +194,15 @@ class FSAPIWatchAdapter implements IStorageEventWatchAdapter {
) {}
async beginWatch(handlers: IStorageEventWatchHandlers): Promise<void> {
// Use FileSystemObserver if available (Chrome 124+)
// Use FileSystemObserver when the browser provides it.
const FileSystemObserver = (compatGlobal as GlobalWithFileSystemObserver).FileSystemObserver;
if (!FileSystemObserver) {
this.addLog("FileSystemObserver is not available; file watching is disabled", LOG_LEVEL_INFO, "fsapi-watch");
this.addLog("Chrome 124 or later supports real-time file watching", LOG_LEVEL_INFO, "fsapi-watch");
this.addLog(
"FileSystemObserver is not available; file watching is disabled",
LOG_LEVEL_INFO,
"fsapi-watch"
);
this.addLog("Use 'Scan local files' after external changes", LOG_LEVEL_INFO, "fsapi-watch");
return Promise.resolve();
}