[webkit-help] Content Blocker: callback when request is blocked

I Bear ibear at tunnelbear.com
Thu Nov 19 06:50:10 PST 2015


Absolutely agree with Andrey, debugging issues caused by content blocker
rules is currently impossible. Being able to add/see a unique rule ID would
be a huge improvement.

On Thu, Nov 19, 2015 at 6:15 AM, Andrey Meshkov <am at adguard.com> wrote:

> Hi!
>
> Currently it is very hard to debug content blocker rules as we can't
> discover which rule has been triggered.
>
> The only notification I see in webkit code is:
>
> if (willBlockLoad) {
>     if (currentDocument)
>         currentDocument->addConsoleMessage(MessageSource::ContentBlocker,
> MessageLevel::Info, makeString("Content blocker prevented frame displaying
> ", mainDocumentURL.string(), " from loading a resource from ",
> request.url().string()));
>        return BlockedStatus::Blocked;
>     }
>
> But clearly that's not enough.
>
> It would be great if there was some kind of a callback method signaling
> about triggered content blocker rule.
>
> Essential information:
> 1. Main document URL
> 2. Request URL
> 3. Content blocker rule (if it is possible to pass the whole rule here).
>
> If point 3 is too hard to implement, you might add an ID property to the
> rule syntax and pass that ID back in the callback method.
>
> --
> wbr, Andrey Meshkov
>
> _______________________________________________
> webkit-help mailing list
> webkit-help at lists.webkit.org
> https://lists.webkit.org/mailman/listinfo/webkit-help
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-help/attachments/20151119/877d6506/attachment.html>


More information about the webkit-help mailing list