Closed adiamante closed 1 year ago
@adiamante ClrProxy might be removed or will be changed, the correct way to supply Clr object would be to implement IJavaScriptObject or inheirt JavaScriptObject class. You can control what to export by using JSExport
attribute. ClrProxy exports everything. I will be updating documentation soon.
Also using signature JSValue Method(in Arguments a)
will be faster compared to using Clr types as arguments as there will be extra checks to convert JSValue to clr types. You can check this unit test on how to use it.
https://github.com/yantrajs/yantra/blob/main/YantraJS.Core.Tests/ClrObjects/CustomObject.cs
@ackava Thanks. That was informative
The documentation on ClrProxy was outdated but I was able to figure out how use it. The following is an example.