MooTools Classes and JsDoc

Posted by Joel Alejandro on Stack Overflow See other posts from Stack Overflow or by Joel Alejandro
Published on 2010-05-05T17:57:08Z Indexed on 2010/05/05 17:58 UTC
Read the original article Hit count: 341

I have the following Moo class:


Nem.Ui.Window = new Class({
    Implements: [Options, Events],

    options: {
        caption:    "Ventana",
        icon:       $empty,
        centered:   true,
        id:         $empty,
        width:      $empty,
        height:     $empty,
        modal:      false,
        desktop:    $empty,
        x:          $empty,
        y:          $empty,
        layout:     $empty
    },

    initialize: function(options)
    {
        this.setOptions(options);
        /* ... */
    },

    setHtmlContents: function(content)
    {
        /* ... */
    },

    setText: function(text)
    {
        /* ... */
    },

    close: function(win)
    {
        /* ... */
    },

    /* ... */
});

I want to document it with JsDoc. I read you can use @lends [class].prototype inside new Class and mark initialize with the @constructs tag. How can I mark methods and events such?

I.E.: setHtmlContents should be a method, close should be an event.

Also, can the elements under options be documented, somehow?

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about mootools