Search code examples
javascriptbackbone.jsmarionette

When Does Marrionette ItemView onClose method get called?


I am trying to use the onClose event to clean up a view before removing it; although, for some reason it never gets called. I've tried calling region.empty, region.reset, showing a new view in the region and even destroying the region and the method just doesn't seem to get called. Is there a specific time that this event is raised?

Thanks in advance.


Solution

  • From version 2.0 up to current version v2.2.0 of Marionette ItemView's onClose methods have changed its name to onDestroy.

    There is a lot of other changes and enhancements. Please check documentation.