Skip to content

Instantly share code, notes, and snippets.

@goofmint
Created May 27, 2016 04:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save goofmint/842ea997774dcdd61779fd227d0adfe6 to your computer and use it in GitHub Desktop.
Save goofmint/842ea997774dcdd61779fd227d0adfe6 to your computer and use it in GitHub Desktop.
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