chore(macos): allow file access for web chat modules

main
Peter Steinberger 2025-12-07 16:14:13 +01:00
parent ba0f594548
commit 73133b61fb
1 changed files with 4 additions and 0 deletions

View File

@ -20,6 +20,10 @@ final class WebChatWindowController: NSWindowController, WKScriptMessageHandler,
config.userContentController = contentController
config.preferences.isElementFullscreenEnabled = true
config.preferences.setValue(true, forKey: "developerExtrasEnabled")
// Allow module imports between local file:// resources (needed because WebKit treats distinct
// file URLs as cross-origin by default).
config.preferences.setValue(true, forKey: "allowFileAccessFromFileURLs")
config.preferences.setValue(true, forKey: "allowUniversalAccessFromFileURLs")
// Inject callback receiver stub
let callbackScript = """