<div dir="ltr">One more thing I missed in this feature request.<div><br></div><div>The callback should be "called" when any content blocker rule is triggered, not just when request is blocked.</div><div><br></div><div>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".</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr">--<br>wbr, Andrey Meshkov<div>skype: aymeshkov<br><div>cell: +7 903 534 9643</div></div></div></div></div>
<br><div class="gmail_quote">2015-11-19 17:50 GMT+03:00 I Bear <span dir="ltr"><<a href="mailto:ibear@tunnelbear.com" target="_blank">ibear@tunnelbear.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">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.</div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Thu, Nov 19, 2015 at 6:15 AM, Andrey Meshkov <span dir="ltr"><<a href="mailto:am@adguard.com" target="_blank">am@adguard.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div>Hi!</div><div><br></div><div>Currently it is very hard to debug content blocker rules as we can't discover which rule has been triggered.</div><div><br></div><div>The only notification I see in webkit code is:</div><div><br></div><font face="monospace, monospace">if (willBlockLoad) {<br> if (currentDocument)<br> currentDocument->addConsoleMessage(MessageSource::ContentBlocker, MessageLevel::Info, makeString("Content blocker prevented frame displaying ", mainDocumentURL.string(), " from loading a resource from ", request.url().string()));<br> return BlockedStatus::Blocked;<br> }</font><br><br>But clearly that's not enough.<div><br></div><div>It would be great if there was some kind of a callback method signaling about triggered content blocker rule.</div><div><br></div><div>Essential information:</div><div>1. Main document URL</div><div>2. Request URL</div><div>3. Content blocker rule (if it is possible to pass the whole rule here).</div><div><br></div><div>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.</div><div><br clear="all"><div><div><div dir="ltr">--<br>wbr, Andrey Meshkov</div></div></div>
</div></div>
<br></div></div>_______________________________________________<br>
webkit-help mailing list<br>
<a href="mailto:webkit-help@lists.webkit.org" target="_blank">webkit-help@lists.webkit.org</a><br>
<a href="https://lists.webkit.org/mailman/listinfo/webkit-help" rel="noreferrer" target="_blank">https://lists.webkit.org/mailman/listinfo/webkit-help</a><br>
<br></blockquote></div><br></div>
<br>_______________________________________________<br>
webkit-help mailing list<br>
<a href="mailto:webkit-help@lists.webkit.org">webkit-help@lists.webkit.org</a><br>
<a href="https://lists.webkit.org/mailman/listinfo/webkit-help" rel="noreferrer" target="_blank">https://lists.webkit.org/mailman/listinfo/webkit-help</a><br>
<br></blockquote></div><br></div>