mirror of
https://github.com/zen-browser/desktop.git
synced 2025-10-08 10:56:36 +00:00
Format event listener and improve attribute setting for workspace tabs
This commit is contained in:
@@ -84,10 +84,14 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
|||||||
await this.delayedStartup();
|
await this.delayedStartup();
|
||||||
}
|
}
|
||||||
await this.promiseSectionsInitialized;
|
await this.promiseSectionsInitialized;
|
||||||
window.addEventListener('MozAfterPaint', async () => {
|
window.addEventListener(
|
||||||
|
'MozAfterPaint',
|
||||||
|
async () => {
|
||||||
await SessionStore.promiseAllWindowsRestored;
|
await SessionStore.promiseAllWindowsRestored;
|
||||||
await this.afterLoadInit();
|
await this.afterLoadInit();
|
||||||
}, { once: true });
|
},
|
||||||
|
{ once: true }
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
async afterLoadInit() {
|
async afterLoadInit() {
|
||||||
@@ -1356,7 +1360,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
|||||||
let tab = gZenUIManager.openAndChangeToTab(BROWSER_NEW_TAB_URL);
|
let tab = gZenUIManager.openAndChangeToTab(BROWSER_NEW_TAB_URL);
|
||||||
|
|
||||||
if (window.uuid) {
|
if (window.uuid) {
|
||||||
tab.setAttribute("zen-workspace-id", window.uuid)
|
tab.setAttribute('zen-workspace-id', window.uuid);
|
||||||
}
|
}
|
||||||
|
|
||||||
return tab;
|
return tab;
|
||||||
|
Reference in New Issue
Block a user