Skip to content

Instantly share code, notes, and snippets.

@goofmint

goofmint/util.js

Created May 27, 2016
Embed
What would you like to do?
h5.u.obj.expose('sample.util', {
:
ajax: function(url, data) {
// ダミーデータを返す
var ret = null;
url = url.url || url;
switch (url) {
case sample.consts.url.FILE_TREE:
ret = treeDatas || createTreeDatas();
ret = ret.slice(0);
break;
}
var dfd = h5.async.deferred();
setTimeout(function() {
dfd.resolve(ret);
}, 0);
return dfd.promise();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment