Files
revisiontony-LoraMangerWebF…/js
revisiontony 5afcd4e60c Add files via upload
Minor Improvements Applied:

Nullish Coalescing Operator (??) - Line 17

Changed: this.widgets_values?.[0] || defaultUrl
To: this.widgets_values?.[0] ?? defaultUrl
Benefit: More precise - only uses default if value is null or undefined, not for empty strings or 0
Iframe Error Handling - Lines 38-40

Added: iframe.addEventListener("error", () => { console.error(...) })
Benefit: Logs to console if iframe fails to load, helps debugging
URL Validation - Lines 56-63

Added: try { new URL(url); iframe.src = url; } catch { console.error(...) }
Benefit: Validates URL format before attempting to load, prevents invalid URL errors
Improved Height Calculation - Line 70

Changed: const safeHeight = size[1] - 90;
To: const safeHeight = Math.max(size[1] - 90, 100);
Benefit: Ensures minimum height of 100px, prevents negative/zero heights on small nodes
Cleanup Handler - Lines 83-86

Added: this.onRemoved = function() { ... }
Benefit: Cancels animation timer and clears iframe when node is deleted, prevents memory leaks
2025-12-15 23:03:19 -08:00
..
2025-12-15 23:03:19 -08:00