How to stop/abort/the request?
I want stop js-generated-request on loaded page.
Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
How to stop/abort/the request?
- salvadordf
- Posts: 4067
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: How to stop/abort/the request?
Hi,
If you know the URL of that request then you can use the TChromiumCore.OnBeforeResourceLoad event which has these code comments :
Implement that event, compare the request.Url and request.ResourceType values and set Result to RV_CANCEL when you decide to block that request.
If you know the URL of that request then you can use the TChromiumCore.OnBeforeResourceLoad event which has these code comments :
Code: Select all
///
/// Called on the IO thread before a resource request is loaded. The |browser|
/// and |frame| values represent the source of the request, and may be NULL
/// for requests originating from service workers or cef_urlrequest_t. To
/// redirect or change the resource load optionally modify |request|.
/// Modification of the request URL will be treated as a redirect. Return
/// RV_CONTINUE to continue the request immediately. Return RV_CONTINUE_ASYNC
/// and call cef_callback_t functions at a later time to continue or cancel
/// the request asynchronously. Return RV_CANCEL to cancel the request
/// immediately.
///