The Liferay.Publisher object duplicates a lot of code and functionality that is already available. It's also not very intuitive to use.
Instead, the Liferay.Publisher object is being renamed to Liferay.Events, with shortcuts in the Liferay object itself, via Liferay.bind, Liferay.trigger, and Liferay.unbind.
The event callback API is mostly unchanged, except that the first parameter is always the event object (usable for accessing the event type, and other details), and the second parameter is whatever data is being passed in to the callback.
This allows us to more easily allow users to listen for events happening in the Liferay javascript, and perform actions when those events happen.
Description
The Liferay.Publisher object duplicates a lot of code and functionality that is already available. It's also not very intuitive to use.
Instead, the Liferay.Publisher object is being renamed to Liferay.Events, with shortcuts in the Liferay object itself, via Liferay.bind, Liferay.trigger, and Liferay.unbind.
The event callback API is mostly unchanged, except that the first parameter is always the event object (usable for accessing the event type, and other details), and the second parameter is whatever data is being passed in to the callback.
This allows us to more easily allow users to listen for events happening in the Liferay javascript, and perform actions when those events happen.