Browse files

Merge #35

Remove jQuery support and update .gitignore
  • Loading branch information...
1 parent 53196d9 commit 0d394014439474dc2e80fb7fe208294ad67dc027 @occ committed Mar 3, 2013
Showing with 2 additions and 72 deletions.
  1. +2 −0 .gitignore
  2. +0 −72 tracekit.js
View
2 .gitignore
@@ -0,0 +1,2 @@
+.idea/
+TraceKit.iml
View
72 tracekit.js
@@ -1083,78 +1083,6 @@ TraceKit.computeStackTrace = (function computeStackTraceWrapper() {
_helper('setInterval');
}());
-/**
- * Extended support for backtraces and global error handling for most
- * asynchronous jQuery functions.
- */
-(function traceKitAsyncForjQuery($) {
-
- // quit if jQuery isn't on the page
- if (!$) {
- return;
- }
-
- var _oldEventAdd = $.event.add;
- $.event.add = function traceKitEventAdd(elem, types, handler, data, selector) {
- var _handler;
-
- if (handler.handler) {
- _handler = handler.handler;
- handler.handler = TraceKit.wrap(handler.handler);
- } else {
- _handler = handler;
- handler = TraceKit.wrap(handler);
- }
-
- // If the handler we are attaching doesn’t have the same guid as
- // the original, it will never be removed when someone tries to
- // unbind the original function later. Technically as a result of
- // this our guids are no longer globally unique, but whatever, that
- // never hurt anybody RIGHT?!
- if (_handler.guid) {
- handler.guid = _handler.guid;
- } else {
- handler.guid = _handler.guid = $.guid++;
- }
-
- return _oldEventAdd.call(this, elem, types, handler, data, selector);
- };
-
- var _oldReady = $.fn.ready;
- $.fn.ready = function traceKitjQueryReadyWrapper(fn) {
- return _oldReady.call(this, TraceKit.wrap(fn));
- };
-
- var _oldAjax = $.ajax;
- $.ajax = function traceKitAjaxWrapper(url, options) {
- var keys = ['complete', 'error', 'success'], key;
-
- // Taken from https://github.com/jquery/jquery/blob/eee2eaf1d7a189d99106423a4206c224ebd5b848/src/ajax.js#L311-L318
- // If url is an object, simulate pre-1.5 signature
- if (typeof url === 'object') {
- options = url;
- url = undefined;
- }
-
- // Force options to be an object
- options = options || {};
-
- while(key = keys.pop()) {
- if ($.isFunction(options[key])) {
- options[key] = TraceKit.wrap(options[key]);
- }
- }
-
- try {
- return _oldAjax.call(this, url, options);
- } catch (e) {
- TraceKit.report(e);
- throw e;
- }
- };
-
-}(window.jQuery));
-
//Default options:
if (!TraceKit.remoteFetching) {
TraceKit.remoteFetching = true;

1 comment on commit 0d39401

Please sign in to comment.