Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

How do you tell that there is an event called contentItemChange and how can you find other XperienCentral events available for subscription? If you look at the code for the event subscription above, you see that the fist argument to the on call is the this reference. That means the event is thrown on the widget object itself. For the _saveButton click event this is quite logical because the widget contains the button. But what about the contentItemChange event? Since it is not defined in the widget it is likely it comes from a parent class. There are three parent classes and only one of them is defined in XperienCentral as seen in the online JSDoc - that is the class SidebarContentItemWidget.

...