-
-
Save tridungle/0d3d3f39b1a5f791e10cc9e0572e04cb to your computer and use it in GitHub Desktop.
Create a jQuery Promise from a Parse promise
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Parse.Promise.prototype.toJqueryPromise = function() { | |
var def = jQuery.Deferred(); | |
this.then( | |
def.resolve.bind(def), | |
def.reject.bind(def) | |
); | |
return def.promise(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment