plugin-debug.js revision feaab31990f7893c59257f33cd9f708a6c0e7ddb
/**
* Provides the base Plugin class for building widget plugins.
*
* @module plugin
*/
/**
* Plugin provides a base class for all Plugin classes.
*
* @class Plugin
* @extends Base
* @param {Object} config The configuration object for the
* plugin.
*/
}
/**
* The plugin's host object.
*
* @attribute host
* @writeOnce
* @type PluginHost
*/
host : {
writeOnce: true
}
};
/**
* Static property provides a string to identify the class.
*
* @property Plugin.NAME
* @type {String}
* @static
*/
/**
* Static property provides the namespace the plugin will be
* registered under.
*
* @property Plugin.NS
* @type {String}
* @static
*/
_handles: null,
/**
* Initializer lifecycle implementation.
*
* @method initializer
* @param {Object} config Configuration object literal for the plugin
*/
initializer : function(config) {
this._handles = [];
// TODO: Temporary
},
/**
* desctructor lifecycle implementation.
*
* Removes any listeners attached by the Plugin and restores
* and over-ridden methods.
*
* @method destructor
*/
destructor: function() {
// remove all handles
if (this._handles) {
}
}
},
/**
* Listens for events and methods fired by the host.
* The handler is called before the event handler or method is called.
* @method doBefore
* @param sFn The event of method to listen for.
* @param fn The handler function to call when the listener fires.
* @param context An optional context to call the handler with.
* Default context is the plugin instance.
* @return Handle A handle that can be used to detach the handler (e.g. "handle.detach()").
*/
}
return handle;
},
/**
* Listens for events and methods fired by the owner widget.
* The handler is called after the event handler or method is called.
* @method doAfter
* @param sFn The event of method to listen for.
* @param fn The handler function to call when the listener fires.
* @param context An optional context to call the handler with.
* Default context is the plugin instance.
* @return Handle A handle that can be used to detach the handler (e.g. "handle.detach()").
*/
}
return handle;
},
toString: function() {
}
});