diff --git a/src/runner/instance.rs b/src/runner/instance.rs index 2464224..720b7a3 100644 --- a/src/runner/instance.rs +++ b/src/runner/instance.rs @@ -112,6 +112,12 @@ impl Instance{ Ok(()) }) }); + fields.add_field_method_get("ClassName",|lua,this|{ + dom(lua,|dom|{ + let instance=this.get(dom)?; + Ok(instance.class.clone()) + }) + }); } fn composition_add_methods<'lua,T:Referent,M:mlua::UserDataMethods<'lua,T>>(methods:&mut M){ methods.add_method("GetChildren",|lua,this,_:()|