Fengari lets you access the DOM. Its pretty cool.
No need for _DOM.
local js = require "js"
local window = js.global
local document = window.document
window:addEventListener("load", function()
local el = document:getElementById("main")
el:addEventListener("click", function(evt) js.console:log(evt.target) end
document.body:appendChild(el)
end
https://github.com/fengari-lua/fengari-web
I don’t know if this can access the DOM in Lua, but considering that Fengari is in Javascript, adding a _DOM global variable should not be too hard (if it hasn’t already been done).