don't listen DOMAttrModified if there is no Tab Utilities.

git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@7257 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
piro 2010-09-17 16:10:59 +00:00
parent 9d129aa30d
commit 25bd92ce80

View File

@ -285,7 +285,7 @@ TreeStyleTabBrowser.prototype = {
b.mTabContainer.addEventListener('SSTabRestored', this, true); b.mTabContainer.addEventListener('SSTabRestored', this, true);
b.mTabContainer.addEventListener('TabPinned', this, true); b.mTabContainer.addEventListener('TabPinned', this, true);
b.mTabContainer.addEventListener('TabUnpinned', this, true); b.mTabContainer.addEventListener('TabUnpinned', this, true);
if (!this.isFloating) if (!this.isFloating && 'tabutils' in window)
b.mTabContainer.addEventListener('DOMAttrModified', this, true); // Tab Utilities b.mTabContainer.addEventListener('DOMAttrModified', this, true); // Tab Utilities
b.mTabContainer.addEventListener('mouseover', this, true); b.mTabContainer.addEventListener('mouseover', this, true);
b.mTabContainer.addEventListener('mouseout', this, true); b.mTabContainer.addEventListener('mouseout', this, true);
@ -1587,7 +1587,7 @@ TreeStyleTabBrowser.prototype = {
b.mTabContainer.removeEventListener('SSTabRestored', this, true); b.mTabContainer.removeEventListener('SSTabRestored', this, true);
b.mTabContainer.removeEventListener('TabPinned', this, true); b.mTabContainer.removeEventListener('TabPinned', this, true);
b.mTabContainer.removeEventListener('TabUnpinned', this, true); b.mTabContainer.removeEventListener('TabUnpinned', this, true);
if (!this.isFloating) if (!this.isFloating && 'tabutils' in window)
b.mTabContainer.removeEventListener('DOMAttrModified', this, true); // Tab Utilites b.mTabContainer.removeEventListener('DOMAttrModified', this, true); // Tab Utilites
b.mTabContainer.removeEventListener('mouseover', this, true); b.mTabContainer.removeEventListener('mouseover', this, true);
b.mTabContainer.removeEventListener('mouseout', this, true); b.mTabContainer.removeEventListener('mouseout', this, true);