I looked around but couldn't find anything, is it possible to add an event listener according to the RegEx rule?
i.e:.
EventBus.trigger('catalog:filter'); EventBus.trigger('catalog:removed');
And I want to catch them in two different ways: 1) Direct binding to ie event:
EventBus.on('catalog:filter', callback);
2) Binding for the RegEx test and capturing all events of this type ie:
EventBus.on(/catalog/, callback);
The second is to catch and process the event directory: filter and directory: deleted. This is the same as the โchangeโ and โchange: [attribute]โ method of event binding. It does not have to be a RegEx object to work.
thanks
source share