Allocate one managed native Lua VM.
optionsTrusted document source policy.
Compile trusted source without executing it, matching LoadString.
sourceLua source text.
pathSource path for diagnostics; defaults to empty.
lineOne-based first source line; defaults to 1.
Native-owned compiled chunk retaining this VM.
Execute trusted Lua source in this host's shared state.
sourceLua source text.
pathOriginal source path for errors; defaults to empty.
lineOriginal first line, one-based; defaults to 1.
Capture the current global function as a native registry reference.
nameGlobal function identifier.
Stable reference unaffected by global replacement.
Copy one scalar global from the native VM.
nameGlobal identifier.
Copied scalar; missing values return null.
Copy a scalar global into the native VM.
nameGlobal identifier; scoped RmlUi globals are reserved.
valueCopied scalar value.
Native-owned Lua 5.4 host; its documents intentionally share Lua globals.
Remarks
Create after initialise. Context selection affects subsequent loads only. Event handlers run directly in Native/Lua. document/context/event/element are scoped globals restored after nested calls. Standard Lua libraries are available; execute only trusted code. Shutdown closes the native VM. Within document Lua, native Variant copies retain guarded pointers and aggregate storage. Node scalar methods accept only LuaScalar values. Native documents, listeners, models, instancers and captured functions retain their VM's pointer values after host facade GC. Host/object cycles stay collectible.