+ Just debugging (adding logging)

This commit is contained in:
Ian Gilman 2010-03-05 17:21:38 -08:00
parent 7fe7451656
commit 22c3ea5eb1
2 changed files with 17 additions and 2 deletions

View File

@ -36,8 +36,15 @@ TabCanvas.prototype = {
// Don't mirror chrome tabs.
//if( window.location.protocol == "chrome:" ) return;
/* Utils.log('attaching', tab.contentWindow.location.href); */
tab.contentWindow.addEventListener("MozAfterPaint", paintIt, false);
/*
tab.contentDocument.addEventListener("onload", function() {
Utils.log('onload', this.tab.contentWindow.location.href);
}, false);
*/
$(window).unload(function(){
tab.contentWindow.removeEventListener("MozAfterPaint", paintIt, false);
})
@ -79,10 +86,18 @@ TabCanvas.prototype = {
},
onPaint: function(evt){
/*
if(this.tab.contentWindow == null || this.tab.contentWindow.location.protocol != 'chrome:')
Utils.trace('on paint', this.tab.contentWindow.location.href);
*/
this.paint(evt);
},
animate: function(options, duration){
/*
if(this.tab.contentWindow == null || this.tab.contentWindow.location.protocol != 'chrome:')
Utils.log('on animate', this.tab.contentWindow.location.href);
*/
var self = this;
if( duration == null ) duration = 0;

View File

@ -98,7 +98,7 @@ var Utils = {
else {
var calls = printStackTrace();
calls.splice(0, 3); // Remove this call and the printStackTrace calls
this.log(text + ' trace:\n' + calls.join('\n'));
this.log('trace: ' + text + '\n' + calls.join('\n'));
}
},