API reference
Preparing search index…

Native-owned Lua 5.4 host; its documents intentionally share Lua globals.

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.

Source & inheritance
Member directory8

Constructors

Methods

Constructors

Methods

  • Compile trusted source without executing it, matching LoadString.

    Parameters

    source
    string

    Lua source text.

    path
    string = ''

    Source path for diagnostics; defaults to empty.

    line
    number = 1

    One-based first source line; defaults to 1.

    Returns

    Native-owned compiled chunk retaining this VM.

    Source & inheritance
  • Execute trusted Lua source in this host's shared state.

    Parameters

    source
    string

    Lua source text.

    path
    string = ''

    Original source path for errors; defaults to empty.

    line
    number = 1

    Original first line, one-based; defaults to 1.

    Returns

    void
    Source & inheritance
  • Read and execute a trusted file through RmlUi FileInterface.

    Parameters

    path
    string

    File source path, matching Interpreter.LoadFile.

    Returns

    void

    Explicit execution does not require the document allowExternal policy.

    Source & inheritance
  • Capture the current global function as a native registry reference.

    Parameters

    name
    string

    Global function identifier.

    Returns

    Stable reference unaffected by global replacement.

    Source & inheritance
  • Copy a scalar global into the native VM.

    Parameters

    name
    string

    Global identifier; scoped RmlUi globals are reserved.

    value

    Copied scalar value.

    Returns

    void
    Source & inheritance

Icons made by Lorc, Delapouite & Skoll · game-icons.net · CC BY 3.0