[Webkit-unassigned] [Bug 152598] Feature request: a callback when request is blocked by the Content Blocker

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 4 12:19:19 PST 2016


https://bugs.webkit.org/show_bug.cgi?id=152598

--- Comment #2 from Andrey Meshkov <am at adguard.com> ---
The main problem with console log is that we cannot access it from the extension (here I mean both OS X and iOS).

The requested feature will allow us to make quite a few very useful improvements:
1. We can show user a number of blocked items
2. We can show user the list of blocked items (lots of users are interested in what was really blocked on the page)
3. If point 3 is implemented, we can provide a simple rules creation/debugging tool. Just look at how it works in our extension for other browsers:

List of requests:
http://screencast.com/t/5WKw2E8T63

Request details:
http://screencast.com/t/TXrSoUlx


> What kind of callback do you have in mind?  We don't have access to much more than the current document here.

You could provide an additional parameter in setContentBlocker method, allowing us to pass a callback method there. I see that in that place where you write the console message, you have access to all request parameters and main document URL, which is a lot already.

Ideally, I'd like to see the following parameters sent to the callback method:
1. Request URL
2. Referrer URL
3. Requested resource type
3. Main document URL
4. Some kind of a tab/window ID. This would be really handy in OS X as we'll be able to distinguish requests by tabs.
5. Content blocker rule (or it's ID if you'll implement it).

One more important notice on this. It will be better to have this callback method called on every request, not just when it's blocked.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160104/7e137a0d/attachment.html>


More information about the webkit-unassigned mailing list