Consider something like:
KeepFn keep;
ElementFilter(this.keep);

And then above this class:
typedef Future<bool> FilterFn(WebElement element);

And someone can use this class without having to subclass it every time.