https://codereview.adblockplus.org/29884580/diff/29884581/lib/content/elemHideEmulation.js File lib/content/elemHideEmulation.js (left): https://codereview.adblockplus.org/29884580/diff/29884581/lib/content/elemHideEmulation.js#oldcode608 lib/content/elemHideEmulation.js:608: constructor(addSelectorsFunc, hideElemsFunc) There are further optimizations and simplifications we ...
File lib/content/elemHideEmulation.js (left):
On 2018/09/18 21:29:47, Sebastian Noack wrote:
> There are further optimizations and simplifications we can do in
> adblockpluschrome if we no longer have to provide an addSelectorFunc. On the
> other hand, if you plan on bringing back user stylesheets for emulated element
> hiding filters (?), I agree to keep the constructor backwards compatible and
> touch the related code in adblockpluschrome. But then you might want to add a
> comment about that here.
At this point I'm really not sure how this is going to go. I would really like
to use style sheets, simply because it's cleaner and harder to mess with (some
documents go into a race condition because they try to unset the inline style
while we try to reset it); but it requires that we maintain the selectors and
keep them up to date, which is a lot of code. For now, I think I'll just leave a
comment in the constructor here. The full discussion about what to do in the
long run can continue on the Trac issue.
Patch Set 2: Add comment in constructor By the way, why not use this opportunity ...