cocos2djs 现在extend menu应该如何处理

var MyMenu = cc.Menu.extend({
    ctor: function(){
        this._super();
        cc.log("my menu");
        return true;
    }
});

MyMenu.create = function(){
    var ret = new MyMenu();

    if(arguments.length == 0) {
        ret.initWithItems(null,null);
    } else if(arguments.length == 1) {
        if(arguments instanceof Array) {
            ret.initWithArray(arguments);
            return ret;
        }
    }
    ret.initWithItems(arguments);
    return ret;
};

```


提示TypeError: ret.initWithItems is not a function