开发者

Javascript methods, classes and events

how should I document this piece of code:

// Is this class?
colors = {

  // Is this method?
  "red" : function() {
     // Do something...
  }

  // Still method?
  "black开发者_开发知识库" : {

     // So what is this?
     "black-1" : function() { /* Do something */ }

   }

}

I am using YUI Doc.

These tags are available

  • @module
  • @class
  • @method
  • @event
  • @property


From using YUI, its docs, and a quick skim of the YUI Doc explanation page, it's my impression that it assumes that you're using the module pattern.

You don't have a module.

  • colors => @static @class
  • red => @method
  • black => @property
  • black-1 => "internal" (ish) so it's not anything under this taxonomy.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜