diff --git a/content/treestyletab/treestyletabbrowser.js b/content/treestyletab/treestyletabbrowser.js index 0a3255c0..b0470b22 100644 --- a/content/treestyletab/treestyletabbrowser.js +++ b/content/treestyletab/treestyletabbrowser.js @@ -4045,7 +4045,7 @@ TreeStyleTabBrowser.prototype = { { /* PUBLIC API */ var event = document.createEvent('Events'); - event.initEvent('TreeStyleTabAttached', true, false); + event.initEvent(this.kEVENT_TYPE_ATTACHED, true, false); event.parentTab = aParent; aChild.dispatchEvent(event); }, @@ -4089,7 +4089,7 @@ TreeStyleTabBrowser.prototype = { /* PUBLIC API */ var event = document.createEvent('Events'); - event.initEvent('TreeStyleTabParted', true, false); + event.initEvent(this.kEVENT_TYPE_DETACHED, true, false); event.parentTab = parentTab; aChild.dispatchEvent(event); diff --git a/modules/utils.js b/modules/utils.js index 911ec66e..1baf9921 100644 --- a/modules/utils.js +++ b/modules/utils.js @@ -130,6 +130,8 @@ var TreeStyleTabUtils = { kEVENT_TYPE_TABBAR_STATE_CHANGING : 'TreeStyleTabTabbarStateChanging', kEVENT_TYPE_TABBAR_STATE_CHANGED : 'TreeStyleTabTabbarStateChanged', kEVENT_TYPE_FOCUS_NEXT_TAB : 'TreeStyleTabFocusNextTab', + kEVENT_TYPE_ATTACHED : 'TreeStyleTabAttached', + kEVENT_TYPE_DETACHED : 'TreeStyleTabParted', kEVENT_TYPE_PRINT_PREVIEW_ENTERED : 'TreeStyleTabPrintPreviewEntered', kEVENT_TYPE_PRINT_PREVIEW_EXITED : 'TreeStyleTabPrintPreviewExited',