2012-04-16 96 views

回答

1

用於訪問數據 DOM屬性使用dojo/dom-attr

require(["dojo/dom-attr"], function(domAttr){ 
    result = domAttr.set("myNode", "data-myattribute", "myValue"); 
}); 

對於一個真正的存儲接口使用dojo/store

require(["dojo/store/Memory", "dojo/store/Observable"], function(Memory, Observable){ 
    var store = Observable(new Memory({ data: someData })); 
});