Skip to content

Commit

Permalink
Improve debug logs around tab restoring
Browse files Browse the repository at this point in the history
(related to #146)
  • Loading branch information
Infocatcher committed Aug 21, 2015
1 parent 25c5e48 commit cc5e06e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -1262,14 +1262,17 @@ var privateTab = {
},
tabRestoringHandler: function(e) {
var tab = e.originalTarget || e.target;
_log("Tab restored: " + (tab.getAttribute("label") || "").substr(0, 256));
var isPrivate = tab.hasAttribute(this.privateAttr);
_log(
"Tab restored, has private attribute: " + isPrivate
+ ", label: " + (tab.getAttribute("label") || "").substr(0, 256)
);
if("_privateTabIgnore" in tab) {
delete tab._privateTabIgnore;
_log("Leave restored tab as is");
this.setTabState(tab); // Private tab may be restored using our API
return;
}
var isPrivate = tab.hasAttribute(this.privateAttr);
if(this.isPrivateTab(tab) != isPrivate) {
_log("Make restored tab " + (isPrivate ? "private" : "not private"));
this.toggleTabPrivate(tab, isPrivate);
Expand Down

0 comments on commit cc5e06e

Please sign in to comment.