From 73c3a97cf86fd18c823ef9ae618c7ac63d83524d Mon Sep 17 00:00:00 2001 From: Mike Burton Date: Thu, 20 Nov 2025 07:21:44 -0800 Subject: [PATCH] comments --- src/ESPUI.cpp | 3 +++ src/ESPUI.h | 1 + 2 files changed, 4 insertions(+) diff --git a/src/ESPUI.cpp b/src/ESPUI.cpp index d4c8d65..522ea69 100644 --- a/src/ESPUI.cpp +++ b/src/ESPUI.cpp @@ -17,6 +17,9 @@ #include #endif +// Optional user-defined JavaScript to be included in the UI. +// Served at /js/custom.js, which is automatically included in index.htm. +// js: JavaScript code as a C-string. Must remain valid for the lifetime of the ESPUIClass instance. static const char* customJS = nullptr; // Set custom JavaScript to be included in the UI. diff --git a/src/ESPUI.h b/src/ESPUI.h index 76143c4..970daa1 100644 --- a/src/ESPUI.h +++ b/src/ESPUI.h @@ -203,6 +203,7 @@ public: // Set optional user-defined JavaScript to be included in the UI. // js: JavaScript code as a C-string. Must remain valid for the lifetime of the ESPUIClass instance. + // This is intentionally not a String to avoid dynamic memory allocation. void setCustomJS(const char* js); // Variables