Bug 213695
| Summary: | ER: Content blocker: Allow use of action selector field when type=block | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Neil Jhaveri <neil> |
| Component: | New Bugs | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Enhancement | CC: | achristensen, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Safari 13 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Neil Jhaveri
ER: Allow use of the the "selector" field of a content rule action when the type is "block".
Right now, the documentation says "For the selector field, specify a string that defines a selector list. This value is required when the action type is css-display-none. If it's not, the selector field is ignored by Safari."
I'm not sure if that's a reasonable request or not. My use case is that I'm writing an email app that uses WKWebView, and my goal is to use the content blocker APIs to block common tracking pixels in messages, without having to block all remote images. I have a curated list of several popular tracking services, but I would like to add a final rule that can capture and block some generic cases, like this:
<img width="1" height="1" ...>
<img width="0" height="0" ...> etc
via selectors like img[width="1"][height="1"] etc.
Admittedly this is far from airtight...
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/64868945>