You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/* * Instantiate a WebView and register a simple JS object */publicpartialclassForm1:Form{publicForm1(){
InitializeComponent();
CEF.RegisterJsObject("test",new Test());WebViewv=new WebView(@"C:\Users\jacko\Desktop\test.html",new CefSharp.BrowserSettings());
v.Parent =this;
v.Dock = DockStyle.Fill;}}classTest{publicintreturnThree(){return3;}}
<!-- test.html: This causes the app to crash! --><html><body><script>varregularObject={};// bind the native method to the JS objectregularObject.returnThree=test.returnThree;// call it from the JS objectregularObject.returnThree();// CRASH!!!</script></body></html>
I did the following by accident:
This is obviously unsupported behavior, but it probably should just cause a JS error, instead of crashing the whole app. Here's the exception.
System.NullReferenceException was unhandled
Message: Object reference not set to an instance of an object.
The text was updated successfully, but these errors were encountered: