We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4391242 commit af9de9cCopy full SHA for af9de9c
plugins/jquery.js
@@ -72,4 +72,19 @@ $.ajax = function ravenAjaxWrapper(url, options) {
72
}
73
};
74
75
+var _oldDeferred = $.Deferred;
76
+$.Deferred = function ravenDeferredWrapper(func) {
77
+ return _oldDeferred(function beforeStartWrapper(deferred) {
78
+ // no need to wrap deferred[ resolve | reject | notify ]
79
+ // as they are calling deferred[ resolveWith | rejectWith | notifyWith ] internally.
80
+ deferred.resolveWith = Raven.wrap(deferred.resolveWith);
81
+ deferred.rejectWith = Raven.wrap(deferred.rejectWith);
82
+ deferred.notifyWith = Raven.wrap(deferred.notifyWith);
83
+ // Call given func if any
84
+ if (func) {
85
+ func.call(deferred, deferred);
86
+ }
87
+ });
88
+};
89
+
90
}(window, window.Raven, window.jQuery));
0 commit comments