public NativeJsInstanceProxy CreateProxyForObject(object o, JsTypeDefinition jsTypeDefinition)
{
if (_createdWrappers.TryGetValue(o, out NativeJsInstanceProxy found))
{
return(found);
}
var proxyObject = new NativeJsInstanceProxy(
_nativeRefList.Count,
o,
jsTypeDefinition);
_nativeRefList.Add(proxyObject);
_createdWrappers.Add(o, proxyObject);
//register
NativeV8JsInterOp.CreateNativePart(_ownerContext, proxyObject);
return(proxyObject);
}