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

Andrey Meshkov am at adguard.com
Thu Nov 19 03:15:43 PST 2015


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-help/attachments/20151119/70613ac0/attachment.html>


More information about the webkit-help mailing list