How to return value in on_before_resource_load

Having problems with building or using the CefGlue .NET/Mono binding? Ask your questions here.

Moderator: fddima

How to return value in on_before_resource_load

Postby clorest510 » Thu Sep 10, 2015 10:06 am

Hi,

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;
clorest510
Newbie
 
Posts: 7
Joined: Sat Jun 20, 2015 4:31 am

Return to CefGlue Forum

Who is online

Users browsing this forum: No registered users and 23 guests