YUI 3.18中的YAHOO.extend和YAHOO.util.Element

时间:2017-11-06 09:48:57

标签: javascript upgrade yui

以下是使用YUI 2.9编写的一些代码,需要升级到YUI 3.18,有人可以帮我吗

var MyEntryField = function (parentWindow, entryElem) {
        this.parentWindow = parentWindow;
        this.id = entryElem.id;
        this.element = $(entryElem);
        this.orgbgColor = null;

        MyEntryField.superclass.constructor.call(this, entryElem, {
            visibility : entryElem.style.visibility
        });
        parentWindow.addChildElement(this.id, this);
    };

    YAHOO.extend(MyEntryField, YAHOO.util.Element, {
        init : function (el, userConfig) {
            el.style.visibility = userConfig.visibility;
            MyEntryField.superclass.init.call(this, el, userConfig);
        }
    });

如何将这段代码从YUI2.9更改为YUI3.18?

0 个答案:

没有答案