Modify URL page

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Modify URL page

Postby unlim » Wed Jan 22, 2020 4:52 am

Hi! Please help. I need modify opened url in CEF. How it made.

In GeckoFX it works
Code: Select all
        public void Observe(nsISupports aSubject, string aTopic, string aData)
        {
            nsIHttpChannel httpChannel = Xpcom.QueryInterface<nsIHttpChannel>(aSubject);
            var result = httpChannel.GetOriginalURIAttribute().ToUri().ToString();


            if (result.Contains("dwl.by"))
            {
                //httpChannel.SetOriginalURIAttribute(IOService.CreateNsIUri("mysite.com"));
                httpChannel.SetOriginalURIAttribute(IOService.CreateNsIUri("https://google.com"));
            }


      }
unlim
Newbie
 
Posts: 1
Joined: Wed Jan 22, 2020 4:49 am

Re: Modify URL page

Postby magreenblatt » Wed Jan 22, 2020 11:30 am

See the tutorial.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 51 guests