Opened 6 years ago

Last modified 5 years ago

#1296 closed change

Add setters for the updateAvailable event — at Version 4

Reported by: fhd Assignee:
Priority: P2 Milestone:
Module: Libadblockplus Keywords:
Cc: trev Blocked By:
Blocking: Platform: Unknown
Ready: yes Confidential: no
Tester: Verified working: no
Review URL(s):

Description (last modified by fhd)


FilterEngine currently throws two events that clients can react to: filterChange and updateAvailable.

While there's FilterEngine::SetFilterChangeCallback to register a callback for that event, handlers for updateAvailable need to be registered manually via JsEngine::SetEventCallback.

The main problem with this is that users of Libadblockplus won't be aware that they can handle updateAvailable events, and at least the latter is something our own clients should use.

What to change

Add methods for adding and removing callbacks for the updateAvailable event to FilterEngine.

Change History (4)

comment:1 Changed 6 years ago by fhd

  • Ready set

comment:2 Changed 6 years ago by trev

You don't need to register a callback for the init event - this event is an implementation detail of the FilterEngine, indeed the constructor will block until that event is fired.

Arguably, creating a more explicit way to set updateAvailable callback is an option.

comment:3 Changed 6 years ago by trev

  • Cc trev added

comment:4 Changed 6 years ago by fhd

  • Description modified (diff)
  • Summary changed from Add setters for the init and updateAvailable events to Add setters for the updateAvailable event

Yeah sure, I was sure I had changed this here...

Note: See TracTickets for help on using tickets.