Fix JS execution: wrap all scripts in IIFEs to avoid WebKit global scope conflicts
WebKit's WKWebView rejects top-level const/let declarations that shadow global function names. Since utils.js defines functions like stateLabel() at the global scope (non-module scripts), and later files destructure the same names from window.NexusTerminal using const, WebKit throws: SyntaxError: Can't create duplicate variable that shadows a global property Fix: wrap every JS file in an IIFE so all declarations are function-scoped. Also remove temporary diagnostic instrumentation.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
(function() {
|
||||
/**
|
||||
* Nexus Terminal — xterm.js terminal manager.
|
||||
* Creates, manages, and destroys xterm.js instances for SSH and Telnet sessions.
|
||||
@@ -287,3 +288,5 @@ class TerminalManager {
|
||||
|
||||
window.NexusTerminal = window.NexusTerminal || {};
|
||||
window.NexusTerminal.TerminalManager = TerminalManager;
|
||||
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user