Do not overwrite already existing window.onerror if exists.
This commit is contained in:
parent
35ffe2c6dd
commit
bfc6db9f20
1 changed files with 12 additions and 6 deletions
|
@ -29,10 +29,10 @@ class _trackSingleton
|
||||||
|
|
||||||
@log( 'start', 'notice', {} )
|
@log( 'start', 'notice', {} )
|
||||||
|
|
||||||
# start initial submit 10 sec. later to avoid ie10 cookie issues
|
# start initial submit 30 sec. later to avoid ie10 cookie issues
|
||||||
delay = =>
|
delay = =>
|
||||||
App.Interval.set @send, 60000
|
App.Interval.set @send, 80000
|
||||||
App.Delay.set delay, 10000
|
App.Delay.set delay, 30000
|
||||||
|
|
||||||
# log clicks
|
# log clicks
|
||||||
$(document).bind(
|
$(document).bind(
|
||||||
|
@ -139,9 +139,15 @@ class _trackSingleton
|
||||||
@data
|
@data
|
||||||
|
|
||||||
`
|
`
|
||||||
window.onerror = function(errorMsg, url, lineNumber) {
|
(function() {
|
||||||
|
window.onerrorOld = window.onerror
|
||||||
|
window.onerror = function(errorMsg, url, lineNumber) {
|
||||||
console.error(errorMsg + " - in " + url + ", line " + lineNumber);
|
console.error(errorMsg + " - in " + url + ", line " + lineNumber);
|
||||||
};
|
if (window.onerrorOld) {
|
||||||
|
window.onerrorOld(errorMsg, url, lineNumber);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}).call(this);
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
var console = window.console
|
var console = window.console
|
||||||
|
|
Loading…
Reference in a new issue