One more thing I missed in this feature request. The callback should be "called" when any content blocker rule is triggered, not just when request is blocked.
We may not need this for "css-display-none" rules. Yet it will be nice to have a way to distinguish elements blocked by content blocker rules from others. Maybe some specific style? Something like "background-image: safari-extension://some-extension/rule/id/123123". -- wbr, Andrey Meshkov skype: aymeshkov cell: +7 903 534 9643 2015-11-19 17:50 GMT+03:00 I Bear <[email protected]>: > 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 <[email protected]> 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 >> [email protected] >> https://lists.webkit.org/mailman/listinfo/webkit-help >> >> > > _______________________________________________ > webkit-help mailing list > [email protected] > https://lists.webkit.org/mailman/listinfo/webkit-help > >
_______________________________________________ webkit-help mailing list [email protected] https://lists.webkit.org/mailman/listinfo/webkit-help
