Browse Source

add captureWindowPerformance method

master
Brett Langdon 12 years ago
parent
commit
c8621f2fd4
1 changed files with 10 additions and 2 deletions
  1. +10
    -2
      sleuth.js

+ 10
- 2
sleuth.js View File

@ -70,7 +70,7 @@
}
};
Sleuth.prototype.onunload = function(){
Sleuth.prototype.captureWindowPerformance = function(){
if(this.config.performance && window.performance !== undefined){
if(window.performance.timing !== undefined){
this.data.timing = window.performance.timing;
@ -82,7 +82,15 @@
};
}
}
this.sendAllData();
};
Sleuth.prototype.onunload = function(){
if(this.config.performance){
this.captureWindowPerformance();
}
if(this.config.unload){
this.sendAllData();
}
};
Sleuth.prototype.sendData = function(data){


Loading…
Cancel
Save