- window.addEventListener('editor-toolbox-change', (event) => {
- const tabName: string = (event as {detail: {tab: string, open: boolean}}).detail.tab;
- const isOpen = (event as {detail: {tab: string, open: boolean}}).detail.open;
- if (tabName === 'comments' && isOpen && this.link.checkVisibility()) {
- this.showForEditor();
- } else {
- this.hideMarker();
- }
- });
+ window.addEventListener('editor-toolbox-change', ((event: CustomEvent<EditorToolboxChangeEventData>) => {
+ const tabName: string = event.detail.tab;
+ const isOpen = event.detail.open;
+ if (tabName === 'comments' && isOpen && this.link.checkVisibility()) {
+ this.showForEditor();
+ } else {
+ this.hideMarker();
+ }
+ }) as EventListener);