wat_catcher 0.10.9 → 0.10.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 712be060f30a0d18b0801b6dfdcfff48fe5bde00
4
- data.tar.gz: df3885aed59be97cb8136995ee4558baf571d704
3
+ metadata.gz: ed6b45af97c9f15ee71d781d75cb849e58fa1ac9
4
+ data.tar.gz: 429fef6173f09cf7fb79d633da51edd6238deb8b
5
5
  SHA512:
6
- metadata.gz: 79380328041b6d62094cf628aec75d91a937914cf10b4f9eb387b5ecc735041f411e856579db6f1abc1277761840972e7e941d2549d484874188d226c72a8985
7
- data.tar.gz: 9e9f68302a48c01e6082ffb2011f788f47c906ff237cdbbecfed4b288f9c47897d8ddc86ad92771276b0115cca3a75f0426f752e5f66ffc309713f2e29d0cf43
6
+ metadata.gz: e11bfb2c661ad9ae4b48d25d4c14195cdcf8c137ff406151b0dd337d201d5bed852f907b37cedadd364b3c55ff4dc6c18b3691fce5b2c3329e6f9c882ce9eb04
7
+ data.tar.gz: b881195b8a15a39b31237dae7b042daecc7357de4ba880219906eb164fbeb8c0f8e307b77ff3b61a0f9fb2704690dddd313899266e820785824155ebb90e0c67
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- wat_catcher (0.10.9)
4
+ wat_catcher (0.10.10)
5
5
  coffee-rails
6
6
  httpclient
7
7
  rails (>= 4.2.0)
@@ -1,3 +1,3 @@
1
1
  module WatCatcher
2
- VERSION = "0.10.9"
2
+ VERSION = "0.10.10"
3
3
  end
@@ -14,7 +14,8 @@ module WatCatcher
14
14
  data: {
15
15
  endpoint: wat_catcher.bugsnag_path(::Rails.application.class.parent_name),
16
16
  apiKey: "a"*32,
17
- user: wat_user.as_json
17
+ user: wat_user.as_json,
18
+ notifyUnhandledRejections: !!WatCatcher.configuration.notify_unhandled_promise_rejections
18
19
  }
19
20
  end
20
21
  end
@@ -1,4 +1,4 @@
1
- // Last updated: 8/2/16
1
+ // v3.1.0, last updated 2017/03/06
2
2
  // **Bugsnag.js** is the official JavaScript notifier for
3
3
  // [Bugsnag](https://bugsnag.com).
4
4
  //
@@ -17,16 +17,23 @@
17
17
  shouldCatch = true,
18
18
  ignoreOnError = 0,
19
19
  breadcrumbs = [],
20
+ breadcrumbHardLimit = 40,
21
+ placeholderErrorName = "BugsnagNotify",
20
22
 
21
- // We've seen cases where individual clients can infinite loop sending us errors
22
- // (in some cases 10,000+ errors per page). This limit is at the point where
23
- // you've probably learned everything useful there is to debug the problem,
24
- // and we're happy to under-estimate the count to save the client (and Bugsnag's) resources.
23
+ // We've seen cases where individual clients can infinite loop sending us errors
24
+ // (in some cases 10,000+ errors per page). This limit is at the point where
25
+ // you've probably learned everything useful there is to debug the problem,
26
+ // and we're happy to under-estimate the count to save the client (and Bugsnag's) resources.
25
27
  eventsRemaining = 10,
26
- // The default depth of attached metadata which is parsed before truncation. It
27
- // is configurable via the `maxDepth` setting.
28
+ // The default depth of attached metadata which is parsed before truncation. It
29
+ // is configurable via the `maxDepth` setting.
28
30
  maxPayloadDepth = 5;
29
31
 
32
+
33
+ // Set default breadcrumbLimit to 20, so we don't send a giant payload.
34
+ // This can be overridden up to the breadcrumbHardLimit
35
+ self.breadcrumbLimit = 20;
36
+
30
37
  // #### Bugsnag.noConflict
31
38
  //
32
39
  // This is obsolete with UMD, as we cannot assume the global scope is polluted with
@@ -76,8 +83,23 @@
76
83
  // will not see it in your dashboard.
77
84
  self.notifyException = function (exception, name, metaData, severity) {
78
85
  if (!exception) {
86
+ var message = "Bugsnag.notifyException() was called with no arguments";
87
+ log(message);
88
+ self.notify(placeholderErrorName, message);
89
+ return;
90
+ }
91
+
92
+ if (typeof exception === "string") {
93
+ log(
94
+ "Bugsnag.notifyException() was called with a string. Expected instance of Error. " +
95
+ "To send a custom message instantiate a new Error or use Bugsnag.notify('<string>')." +
96
+ " see https://docs.bugsnag.com/platforms/browsers/#reporting-handled-exceptions"
97
+ );
98
+ // pass through to notify()
99
+ self.notify.apply(null, arguments);
79
100
  return;
80
101
  }
102
+
81
103
  if (name && typeof name !== "string") {
82
104
  metaData = name;
83
105
  name = undefined;
@@ -103,6 +125,12 @@
103
125
  // Notify Bugsnag about an error by passing in a `name` and `message`,
104
126
  // without requiring an exception.
105
127
  self.notify = function (name, message, metaData, severity) {
128
+ if (!name) {
129
+ name = placeholderErrorName;
130
+ message = "Bugsnag.notify() was called with no arguments";
131
+ log(message);
132
+ }
133
+
106
134
  sendToBugsnag({
107
135
  name: name,
108
136
  message: message,
@@ -127,9 +155,11 @@
127
155
  //
128
156
  // - `metadata` (optional, object) - Additional information about the breadcrumb. Values limited to 140 characters.
129
157
  self.leaveBreadcrumb = function(value, metaData) {
158
+ var DEFAULT_TYPE = "manual";
159
+
130
160
  // default crumb
131
161
  var crumb = {
132
- type: "manual",
162
+ type: DEFAULT_TYPE,
133
163
  name: "Manual",
134
164
  timestamp: new Date().getTime()
135
165
  };
@@ -153,13 +183,33 @@
153
183
  return;
154
184
  }
155
185
 
186
+ // Validate breadcrumb type and replace invalid type with default.
187
+ var VALID_TYPES = [DEFAULT_TYPE, "error", "log", "navigation", "process", "request", "state", "user"];
188
+ var validType = false;
189
+ for (var i = 0; i < VALID_TYPES.length; i++) {
190
+ if (VALID_TYPES[i] === crumb.type) {
191
+ validType = true;
192
+ break;
193
+ }
194
+ }
195
+ if (!validType) {
196
+ log("Converted invalid breadcrumb type '" + crumb.type + "' to '" + DEFAULT_TYPE + "'");
197
+ crumb.type = DEFAULT_TYPE;
198
+ }
199
+
156
200
  var lastCrumb = breadcrumbs.slice(-1)[0];
157
201
  if (breadcrumbsAreEqual(crumb, lastCrumb)) {
158
202
  lastCrumb.count = lastCrumb.count || 1;
159
203
  lastCrumb.count++;
160
204
  } else {
205
+ var breadcrumbLimit = Math.min(self.breadcrumbLimit, breadcrumbHardLimit);
161
206
  crumb.name = truncate(crumb.name, 32);
162
207
  breadcrumbs.push(truncateDeep(crumb, 140));
208
+
209
+ // limit breadcrumb trail length, so the payload doesn't get too large
210
+ if (breadcrumbs.length > breadcrumbLimit) {
211
+ breadcrumbs = breadcrumbs.slice(-breadcrumbLimit);
212
+ }
163
213
  }
164
214
  };
165
215
 
@@ -225,22 +275,34 @@
225
275
  var _hasAddEventListener = (typeof window.addEventListener !== "undefined");
226
276
 
227
277
  // Setup breadcrumbs for click events
228
- function trackClicks() {
229
- if(!getBreadcrumbSetting("autoBreadcrumbsClicks", true)) {
230
- return;
231
- }
232
-
278
+ function setupClickBreadcrumbs() {
233
279
  if (!_hasAddEventListener) {
234
280
  return;
235
281
  }
236
282
 
237
283
  var callback = function(event) {
284
+ if(!getBreadcrumbSetting("autoBreadcrumbsClicks")) {
285
+ return;
286
+ }
287
+
288
+ var targetText, targetSelector;
289
+ // Cross origin security might prevent us from accessing the event target
290
+
291
+ try {
292
+ targetText = nodeText(event.target);
293
+ targetSelector = nodeLabel(event.target);
294
+ } catch (e) {
295
+ targetText = "[hidden]";
296
+ targetSelector = "[hidden]";
297
+ log("Cross domain error when tracking click event. See https://docs.bugsnag.com/platforms/browsers/faq/#3-cross-origin-script-errors");
298
+ }
299
+
238
300
  self.leaveBreadcrumb({
239
301
  type: "user",
240
302
  name: "UI click",
241
303
  metaData: {
242
- targetText: nodeText(event.target),
243
- targetSelector: nodeLabel(event.target)
304
+ targetText: targetText,
305
+ targetSelector: targetSelector
244
306
  }
245
307
  });
246
308
  };
@@ -248,13 +310,18 @@
248
310
  window.addEventListener("click", callback, true);
249
311
  }
250
312
 
313
+ // stub functions for old browsers
314
+ self.enableAutoBreadcrumbsConsole = function() {};
315
+ self.disableAutoBreadcrumbsConsole = function() {};
316
+
251
317
  // Setup breadcrumbs for console.log, console.warn, console.error
252
- function trackConsoleLog(){
253
- if(!window.console || typeof window.console.log !== "function" || !getBreadcrumbSetting("autoBreadcrumbsConsole")) {
254
- return;
255
- }
318
+ function setupConsoleBreadcrumbs(){
256
319
 
257
320
  function trackLog(severity, args) {
321
+ if(!getBreadcrumbSetting("autoBreadcrumbsConsole")) {
322
+ return;
323
+ }
324
+
258
325
  self.leaveBreadcrumb({
259
326
  type: "log",
260
327
  name: "Console output",
@@ -265,34 +332,51 @@
265
332
  });
266
333
  }
267
334
 
268
- enhance(console, "log", function() {
269
- trackLog("log", arguments);
270
- });
335
+ // feature detection for console.log
336
+ if(typeof window.console === "undefined") {
337
+ return;
338
+ }
271
339
 
272
- enhance(console, "warn", function() {
273
- trackLog("warn", arguments);
274
- });
340
+ // keep track of functions that we will need to hijack
341
+ var nativeLog = console.log,
342
+ nativeWarn = console.warn,
343
+ nativeError = console.error;
275
344
 
276
- enhance(console, "error", function() {
277
- trackLog("error", arguments);
278
- });
279
- }
345
+ self.enableAutoBreadcrumbsConsole = function() {
346
+ self.autoBreadcrumbsConsole = true;
280
347
 
281
- // Setup breadcrumbs for history navigation events
282
- function trackNavigation() {
283
- if(!getBreadcrumbSetting("autoBreadcrumbsNavigation")) {
284
- return;
285
- }
348
+ enhance(console, "log", function() {
349
+ trackLog("log", arguments);
350
+ });
286
351
 
287
- // check for browser support
288
- if (!_hasAddEventListener ||
289
- !window.history ||
290
- !window.history.state ||
291
- !window.history.pushState ||
292
- !window.history.pushState.bind
293
- ) {
294
- return;
352
+ enhance(console, "warn", function() {
353
+ trackLog("warn", arguments);
354
+ });
355
+
356
+ enhance(console, "error", function() {
357
+ trackLog("error", arguments);
358
+ });
359
+ };
360
+
361
+ self.disableAutoBreadcrumbsConsole = function() {
362
+ self.autoBreadcrumbsConsole = false;
363
+
364
+ console.log = nativeLog;
365
+ console.warn = nativeWarn;
366
+ console.error = nativeError;
367
+ };
368
+
369
+ if(getBreadcrumbSetting("autoBreadcrumbsConsole")) {
370
+ self.enableAutoBreadcrumbsConsole();
295
371
  }
372
+ }
373
+
374
+ // stub functions for old browsers
375
+ self.enableAutoBreadcrumbsNavigation = function() {};
376
+ self.disableAutoBreadcrumbsNavigation = function() {};
377
+
378
+ // Setup breadcrumbs for history navigation events
379
+ function setupNavigationBreadcrumbs() {
296
380
 
297
381
  function parseHash(url) {
298
382
  return url.split("#")[1] || "";
@@ -378,10 +462,44 @@
378
462
  // functional fu to make it easier to setup event listeners
379
463
  function wrapBuilder(builder) {
380
464
  return function() {
465
+ if(!getBreadcrumbSetting("autoBreadcrumbsNavigation")) {
466
+ return;
467
+ }
468
+
381
469
  self.leaveBreadcrumb(builder.apply(null, arguments));
382
470
  };
383
471
  }
384
472
 
473
+ // check for browser support
474
+ if (!_hasAddEventListener ||
475
+ !window.history ||
476
+ !window.history.state ||
477
+ !window.history.pushState ||
478
+ !window.history.pushState.bind
479
+ ) {
480
+ return;
481
+ }
482
+
483
+ // keep track of native functions
484
+ var nativePushState = history.pushState,
485
+ nativeReplaceState = history.replaceState;
486
+
487
+ // create enable function
488
+ self.enableAutoBreadcrumbsNavigation = function() {
489
+ self.autoBreadcrumbsNavigation = true;
490
+ // create hooks for pushstate and replaceState
491
+ enhance(history, "pushState", wrapBuilder(buildPushState));
492
+ enhance(history, "replaceState", wrapBuilder(buildReplaceState));
493
+ };
494
+
495
+ // create disable function
496
+ self.disableAutoBreadcrumbsNavigation = function() {
497
+ self.autoBreadcrumbsNavigation = false;
498
+ // restore native functions
499
+ history.pushState = nativePushState;
500
+ history.replaceState = nativeReplaceState;
501
+ };
502
+
385
503
  window.addEventListener("hashchange", wrapBuilder(buildHashChange), true);
386
504
  window.addEventListener("popstate", wrapBuilder(buildPopState), true);
387
505
  window.addEventListener("pagehide", wrapBuilder(buildPageHide), true);
@@ -389,11 +507,49 @@
389
507
  window.addEventListener("load", wrapBuilder(buildLoad), true);
390
508
  window.addEventListener("DOMContentLoaded", wrapBuilder(buildDOMContentLoaded), true);
391
509
 
392
- // create hooks for pushstate and replaceState
393
- enhance(history, "pushState", wrapBuilder(buildPushState));
394
- enhance(history, "replaceState", wrapBuilder(buildReplaceState));
510
+ if(getBreadcrumbSetting("autoBreadcrumbsNavigation")) {
511
+ self.enableAutoBreadcrumbsNavigation();
512
+ }
395
513
  }
396
514
 
515
+ self.enableAutoBreadcrumbsErrors = function() {
516
+ self.autoBreadcrumbsErrors = true;
517
+ };
518
+
519
+ self.disableAutoBreadcrumbsErrors = function() {
520
+ self.autoBreadcrumbsErrors = false;
521
+ };
522
+
523
+ self.enableAutoBreadcrumbsClicks = function() {
524
+ self.autoBreadcrumbsClicks = true;
525
+ };
526
+
527
+ self.disableAutoBreadcrumbsClicks = function() {
528
+ self.autoBreadcrumbsClicks = false;
529
+ };
530
+
531
+ self.enableAutoBreadcrumbs = function() {
532
+ self.enableAutoBreadcrumbsClicks();
533
+ self.enableAutoBreadcrumbsConsole();
534
+ self.enableAutoBreadcrumbsErrors();
535
+ self.enableAutoBreadcrumbsNavigation();
536
+ };
537
+
538
+ self.disableAutoBreadcrumbs = function() {
539
+ self.disableAutoBreadcrumbsClicks();
540
+ self.disableAutoBreadcrumbsConsole();
541
+ self.disableAutoBreadcrumbsErrors();
542
+ self.disableAutoBreadcrumbsNavigation();
543
+ };
544
+
545
+ self.enableNotifyUnhandledRejections = function() {
546
+ self.notifyUnhandledRejections = true;
547
+ };
548
+
549
+ self.disableNotifyUnhandledRejections = function() {
550
+ self.notifyUnhandledRejections = false;
551
+ };
552
+
397
553
  //
398
554
  // ### Script tag tracking
399
555
  //
@@ -452,7 +608,7 @@
452
608
  // Set up default notifier settings.
453
609
  var DEFAULT_BASE_ENDPOINT = "https://notify.bugsnag.com/";
454
610
  var DEFAULT_NOTIFIER_ENDPOINT = DEFAULT_BASE_ENDPOINT + "js";
455
- var NOTIFIER_VERSION = "3.0.0-rc.1";
611
+ var NOTIFIER_VERSION = "3.1.0";
456
612
 
457
613
  // Keep a reference to the currently executing script in the DOM.
458
614
  // We'll use this later to extract settings from attributes.
@@ -466,12 +622,12 @@
466
622
  // })
467
623
  function enhance(object, property, newFunction) {
468
624
  var oldFunction = object[property];
469
- if (typeof oldFunction === "function") {
470
- object[property] = function() {
471
- newFunction.apply(this, arguments);
625
+ object[property] = function() {
626
+ newFunction.apply(this, arguments);
627
+ if (typeof oldFunction === "function") {
472
628
  oldFunction.apply(this, arguments);
473
- };
474
- }
629
+ }
630
+ };
475
631
  }
476
632
 
477
633
  // Simple logging function that wraps `console.log` if available.
@@ -494,7 +650,13 @@
494
650
  // extract text content from a element
495
651
  function nodeText(el) {
496
652
  var text = el.textContent || el.innerText || "";
497
- return truncate(text.trim(), 40);
653
+
654
+ if (el.type === "submit" || el.type === "button") {
655
+ text = el.value;
656
+ }
657
+
658
+ text = text.replace(/^\s+|\s+$/g, ""); // trim whitespace
659
+ return truncate(text, 140);
498
660
  }
499
661
 
500
662
  // Create a label from tagname, id and css class of the element
@@ -555,21 +717,42 @@
555
717
  }
556
718
  }
557
719
 
720
+ function isArray(arg) {
721
+ return Object.prototype.toString.call(arg) === "[object Array]";
722
+ }
723
+
558
724
  // truncate all string values in nested object
559
- function truncateDeep(object, length) {
560
- if (typeof object === "object") {
725
+ function truncateDeep(object, length, depth) {
726
+ var newDepth = (depth || 0) + 1;
727
+ var setting = getSetting("maxDepth", maxPayloadDepth);
728
+
729
+ if (depth > setting) {
730
+ return "[RECURSIVE]";
731
+ }
732
+
733
+ // Handle truncating strings
734
+ if (typeof object === "string") {
735
+ return truncate(object, length);
736
+
737
+ // Handle truncating array contents
738
+ } else if (isArray(object)) {
739
+ var newArray = [];
740
+ for (var i = 0; i < object.length; i++) {
741
+ newArray[i] = truncateDeep(object[i], length, newDepth);
742
+ }
743
+ return newArray;
744
+
745
+ // Handle truncating object keys
746
+ } if (typeof object === "object" && object != null) {
561
747
  var newObject = {};
562
- each(object, function(value, key){
563
- if (value != null && value !== undefined) {
564
- newObject[key] = truncateDeep(value, length);
748
+ for (var key in object) {
749
+ if (object.hasOwnProperty(key)) {
750
+ newObject[key] = truncateDeep(object[key], length, newDepth);
565
751
  }
566
- });
567
-
752
+ }
568
753
  return newObject;
569
- } else if (typeof object === "string") {
570
- return truncate(object, length);
571
- } else if (object && Array === object.constructor) {
572
- return map(object, function(value) { return truncateDeep(value, length); });
754
+
755
+ // Just return everything else (numbers, booleans, functions, etc.)
573
756
  } else {
574
757
  return object;
575
758
  }
@@ -605,36 +788,6 @@
605
788
  }
606
789
 
607
790
 
608
- // Map over an array or object
609
- // re-implementation of lodash map
610
- function map(source, iteratee) {
611
- if (typeof iteratee === "undefined") {
612
- return source;
613
- }
614
-
615
- var newArray = [];
616
-
617
- each(source, newArray.push);
618
-
619
- return newArray;
620
- }
621
-
622
- // Iterate over an array or object
623
- // re-implementation of lodash each
624
- function each(source, iteratee) {
625
- if (typeof source === "object") {
626
- for (var key in source) {
627
- if (source.hasOwnProperty(key)) {
628
- iteratee(source[key], key, source);
629
- }
630
- }
631
- } else {
632
- for (var index = 0; index < source.length; index++) {
633
- iteratee(source[index], index, source);
634
- }
635
- }
636
- }
637
-
638
791
  // Deep-merge the `source` object into the `target` object and return
639
792
  // the `target`. Properties in source that will overwrite those in target.
640
793
  // Similar to jQuery's `$.extend` method.
@@ -733,7 +886,7 @@
733
886
  }
734
887
 
735
888
  // get breadcrumb specific setting. When autoBreadcrumbs is true, all individual events are defaulted
736
- // to true. Otherwise they will all defaul to false. You can set any event specicically and it will override
889
+ // to true. Otherwise they will all default to false. You can set any event specifically and it will override
737
890
  // the default.
738
891
  function getBreadcrumbSetting(name) {
739
892
  var fallback = getSetting("autoBreadcrumbs", true);
@@ -777,6 +930,10 @@
777
930
  previousNotification = deduplicate;
778
931
  }
779
932
 
933
+ var defaultEventMetaData = {
934
+ device: { time: (new Date()).getTime() }
935
+ };
936
+
780
937
  // Build the request payload by combining error information with other data
781
938
  // such as user-agent and locale, `metaData` and settings.
782
939
  var payload = {
@@ -785,9 +942,8 @@
785
942
  apiKey: apiKey,
786
943
  projectRoot: getSetting("projectRoot") || window.location.protocol + "//" + window.location.host,
787
944
  context: getSetting("context") || window.location.pathname,
788
- userId: getSetting("userId"), // Deprecated, remove in v3
789
945
  user: getSetting("user"),
790
- metaData: merge(merge({}, getSetting("metaData")), metaData),
946
+ metaData: merge(merge(defaultEventMetaData, getSetting("metaData")), metaData),
791
947
  releaseStage: releaseStage,
792
948
  appVersion: getSetting("appVersion"),
793
949
 
@@ -817,7 +973,7 @@
817
973
  }
818
974
 
819
975
  if (payload.lineNumber === 0 && (/Script error\.?/).test(payload.message)) {
820
- return log("Ignoring cross-domain script error. See https://bugsnag.com/docs/notifiers/js/cors");
976
+ return log("Ignoring cross-domain or eval script error. See https://docs.bugsnag.com/platforms/browsers/faq/#3-cross-origin-script-errors");
821
977
  }
822
978
 
823
979
  // Make the HTTP request
@@ -1037,6 +1193,21 @@
1037
1193
  });
1038
1194
  }
1039
1195
 
1196
+ if ("onunhandledrejection" in window) {
1197
+ // browsers with promise support have `addEventListener`
1198
+ window.addEventListener("unhandledrejection", function (event) {
1199
+ if (getSetting("notifyUnhandledRejections", false)) {
1200
+ var err = event.reason;
1201
+ if (err && (err instanceof Error || err.message)) {
1202
+ self.notifyException(err);
1203
+ } else {
1204
+ // Hopefully the reason is a serializable value (this may yield less than useful results if reject() is abused)
1205
+ self.notify("UnhandledRejection", err);
1206
+ }
1207
+ }
1208
+ });
1209
+ }
1210
+
1040
1211
  // EventTarget is all that's required in modern chrome/opera
1041
1212
  // EventTarget + Window + ModalWindow is all that's required in modern FF (there are a few Moz prefixed ones that we're ignoring)
1042
1213
  // The rest is a collection of stuff for Safari and IE 11. (Again ignoring a few MS and WebKit prefixed things)
@@ -1049,14 +1220,14 @@
1049
1220
  // we need to change f.handleEvent here, as self.wrap will ignore f.
1050
1221
  try {
1051
1222
  if (f && f.handleEvent) {
1052
- f.handleEvent = wrap(f.handleEvent, {eventHandler: true});
1223
+ f.handleEvent = wrap(f.handleEvent);
1053
1224
  }
1054
1225
  } catch (err) {
1055
1226
  // When selenium is installed, we sometimes get 'Permission denied to access property "handleEvent"'
1056
1227
  // Because this catch is around Bugsnag library code, it won't catch any user errors
1057
1228
  log(err);
1058
1229
  }
1059
- return _super.call(this, e, wrap(f, {eventHandler: true}), capture, secure);
1230
+ return _super.call(this, e, wrap(f), capture, secure);
1060
1231
  };
1061
1232
  });
1062
1233
 
@@ -1073,9 +1244,14 @@
1073
1244
  }
1074
1245
 
1075
1246
  // setup auto breadcrumb tracking
1076
- trackClicks();
1077
- trackConsoleLog();
1078
- trackNavigation();
1247
+ setupClickBreadcrumbs();
1248
+ setupConsoleBreadcrumbs();
1249
+ setupNavigationBreadcrumbs();
1250
+
1251
+ // Leave the initial breadcrumb
1252
+ if (getSetting("autoBreadcrumbs", true)) {
1253
+ self.leaveBreadcrumb({ type: "navigation", name: "Bugsnag Loaded" });
1254
+ }
1079
1255
 
1080
1256
  window.Bugsnag = self;
1081
1257
  // If people are using a javascript loader, we should integrate with it.
@@ -1095,4 +1271,4 @@
1095
1271
  // CommonJS/Browserify
1096
1272
  module.exports = self;
1097
1273
  }
1098
- })(window, window.Bugsnag);
1274
+ })(window, window.Bugsnag);
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wat_catcher
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.9
4
+ version: 0.10.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Constantine
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-09 00:00:00.000000000 Z
11
+ date: 2017-03-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler