I have searched the solution to how to get the return value of on_before_resource_load.
I tried this way:
code1:
- Code: Select all
this.cefWebBrowser.Browser.GetMainFrame().ExecuteJavaScript("var key = 'mykey';var value = 'myValue';xmlhttp=new XMLHttpRequest();if (xmlhttp){xmlhttp.open('GET','https://key!@#value', true);xmlhttp.send();}", "", 0);
and I got this request (created by XMLHttpRequest) in on_before_resource_load using
code2:
- Code: Select all
var m_request = CefRequest.FromNative(request);
var result = OnBeforeResourceLoad(m_browser, m_frame, m_request);
string url = m_request.Url;
But in the place I call code1, how to get the " m_request.Url " in code2?
please help;