Can now add a lua file with the same name as a page for page-scoped lua functionality

This commit is contained in:
2026-07-12 20:40:32 -05:00
parent 78fe9a9abc
commit 017776a7f3
3 changed files with 45 additions and 2 deletions

17
assets/pages/lua-test.lua Normal file
View File

@@ -0,0 +1,17 @@
LuaTest = {}
local counter = 0
function LuaTest.Test(event)
counter = counter + 1
local document = event.current_element.owner_document
local target = document:GetElementById("lua-counter")
if target then
target.inner_rml = "Lua Counter: " .. counter
end
print("Lua counter incremented to: " .. counter)
end