开发者

yui3 widget error "this.constructor.NAME is undefined"

开发者 https://www.devze.com 2023-02-02 07:39 出处:网络
I am creating a yui3 widget and I keep getting this error: this.constructor.NAME is undefined. I am defining a name in my widget:

I am creating a yui3 widget and I keep getting this error: this.constructor.NAME is undefined.

I am defining a name in my widget:

YUI().add('pagina开发者_JS百科tor', function(Y) {

    function Paginate(config) {
        Paginate.superclass.constructor.apply(this, arguments);
    }

    Paginate.NAME = "paginate";
    ...

So, I am not sure what's going on.

Edit: I also wanted to add that I have just tried to add the default widget skeleton from here and I am still getting the same error.


I thought I would answer this myself in case anyone else comes across this problem. I forgot the new keyword when creating my widget.

0

精彩评论

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