Does the following do what you want? I've just removed the initialize
function, added @name BaseView
to the doclet that was in front of it and removed the @exports ...
that was in the same doclet because it seemed incorrect there.
/**
* @exports BaseView
*/
define(['backbone'], function( Backbone ) {
'use strict';
return Backbone.View.extend( /** @lends BaseView.prototype */ {
/**
* Base view with close method
* @augments Backbone.View
* @constructor
* @name BaseView
*/
/**
* Removes the view from the DOM and unbinds all events.
*/
close: function() {
this.remove();
this.unbind();
if (this.onClose) {
// Optionally, run additional cleanup methods.
this.onClose();
}
}
});
});