[Jsdoc-user] JSON object containing functions
Status: Inactive
Brought to you by:
mmathews
From: Ryan P. <sky...@ya...> - 2006-08-09 01:29:40
|
I have some functions that I want to document, but because they're within an object, JSDoc won't document it. Here's a sample: /** * This is the parent container for all of the functions relating to this portlet. * @author Ryan Parman * @version 20060807 */ var favorites = { /** * This is the function that gets fired when the portlet loads. Anything that needs to fire with the portlet load MUST be called within this function. * @author Ryan Parman * @version 20060807 */ loadMe:function() { // Hide items that need to be hidden by default this.defaultHide(); // Read JSON object and generate lists this.buildListNode(jsonListItems); // Make the lists sortable this.makeSortable(); // Apply event handlers Behaviour.register(favorites_rules); // Set these up for canceling var FAVORITES_CURRENT_ACTIVE=null; var FAVORITES_CURRENT_INACTIVE=null; }, /** * Hide the elements that need to be hidden by default. * @author Ryan Parman * @version 20060807 */ defaultHide:function() { Element.hide('edit-controls'); Element.hide('save-controls'); Element.hide('add_panel'); $('add_submit').disabled=true; } } If I change "var favorites" to "function favorites()", I'll get the documentation generated, but the JavaScript syntax doesn't work right (favorites.loadMe()). __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |