こんにちはオブジェクトのインスタンスに名前を付けて破棄する方法は?jsfiddleでの作業をご覧ください
declare("obj_Button", [_WidgetBase], {
buildRendering: function () {
// create the DOM for this widget
this.domNode = domConstruct.create("button", {
innerHTML: "New Button Instance"
});
}
});
on(dom.byId('btn1'), "click", function(evt)
{
(new obj_Button()).placeAt(dom.byId('id'));
//name the instance
});
parser.parse(); // check out more!
on(dom.byId('btn2'), "click", function(evt)
{
// destroy the instance by name, not object
});
お知らせ下さい。ありがとう