SteveSandersonMS / WebWindow

.NET Core library to open native OS windows containing web UI on Windows, Mac, and Linux. Experimental.
Apache License 2.0
1.99k stars 214 forks source link

InvokeMethodAsync on a DotNetObjectReference throws NullReferenceException #113

Open mrpmorris opened 4 years ago

mrpmorris commented 4 years ago

I've edited the BlazorDesktopApp sample.

https://drive.google.com/file/d/1XxBcu6t4M7FQMsN1wfJ8JNNSfsQTDDHB/view?usp=sharing

Clicking the button should call into JS to call back a static method, and then call into JS to call back a method on the component.

The call to the object method fails - can anyone see why?

mrpmorris commented 4 years ago

Note: If I copy / paste the code into a Web Assembly app it works fine.

jspuij commented 4 years ago

@mrpmorris You need to pull this:

https://github.com/SteveSandersonMS/WebWindow/pull/94

Or use my blazorwebview ;-)