« first day (948 days earlier)      last day (3169 days later) » 

18:38
Ya got it.... so I can do something like this

function WaitForEventInModal() {

return new Promise(function(resolve, reject) {
// only `delay` is able to resolve or reject the promise
$(MyModal).on('click',MyModal,function(){})
});
}
1 message moved from JavaScript<ball pit>
 
3 hours later…
22:03
Meteor.methods({
'updateItem': function (itemId, param) {
var result = HTTP.call("GET", url);
var itemPush = {
item: {
_id: JSON.parse(result.content).data[0].id,
username: JSON.parse(result.content).data[0].user.username,
}
}
Collection.update(itemId, {$push: itemPush}, {validationContext: 'updateForm'}, function(error, result) {
if (error){
console.log("error:", error);
}
});
}
});
1 message moved from JavaScript<ball pit>

« first day (948 days earlier)      last day (3169 days later) »