-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
28 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
import { TabManagerWorkerCaller } from '../src/caller'; | ||
import { tabManagerEvents } from '../src/helper'; | ||
import { TabsManagerWorkerCaller } from '../src/caller'; | ||
import { TabsManagerEvents } from '../src/helper'; | ||
|
||
const tabManager = new TabManagerWorkerCaller({ | ||
const tabManager = new TabsManagerWorkerCaller({ | ||
workerPath: 'worker.js', | ||
}); | ||
|
||
tabManager.addListener(tabManagerEvents.activeTab, (isActive: boolean) => { | ||
document.title = isActive ? '🧐 active' : 'inactive'; | ||
tabManager.addListener(TabsManagerEvents.activeTab, (isActive: boolean) => { | ||
document.title = isActive ? '✅ active' : 'inactive'; | ||
}); | ||
tabManager.init(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { TabManagerWorkerServer } from '../src/worker'; | ||
import { TabsManagerWorkerServer } from '../src/worker'; | ||
|
||
const server = new TabManagerWorkerServer(); | ||
const server = new TabsManagerWorkerServer(); | ||
server.init(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
export const workerEvents = { | ||
activeTabId: 'tab-manager-active-tab-id', | ||
setActiveTab: 'tab-manager-set-active-tab', | ||
checkActiveTab: 'tab-manager-check-active-tab', | ||
closeWindow: 'tab-manager-close-window', | ||
activeTabId: 'tabs-manager-active-tab-id', | ||
setActiveTab: 'tabs-manager-set-active-tab', | ||
checkActiveTab: 'tabs-manager-check-active-tab', | ||
closeWindow: 'tabs-manager-close-window', | ||
}; | ||
|
||
export const tabManagerEvents = { | ||
error: 'tab-manager-error', | ||
activeTab: 'tab-manager-active-tab', | ||
export const TabsManagerEvents = { | ||
error: 'tabs-manager-error', | ||
activeTab: 'tabs-manager-active-tab', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters