refactor: Initialize ZenThemeMarketplace and ZenThemeMarketplaceChild modules

Initialize the ZenThemeMarketplace module in ZenThemeMarketplace.mjs and the ZenThemeMarketplaceChild module in ZenThemeMarketplaceChild.sys.mjs. This commit sets up the basic structure for these modules, including empty `init` and `handleEvent` methods.

Refactor ZenThemeMarketplace.mjs:
- Add `init` method

Refactor ZenThemeMarketplaceChild.sys.mjs:
- Add `initiateThemeMarketplace` method
- Add `addIntallButton` method
This commit is contained in:
Mauro Balades 2024-08-14 22:27:00 +02:00
parent ccea9cbae7
commit dba14de44c
2 changed files with 31 additions and 0 deletions

View file

@ -0,0 +1,5 @@
const gZenThemeMarketplace = {
init() {
},
};

View file

@ -0,0 +1,26 @@
export class ZenThemeMarketplaceChild extends JSWindowActorChild {
constructor() {
super();
}
handleEvent(event) {
switch (event.type) {
case "DOMContentLoaded":
this.initiateThemeMarketplace();
break;
default:
}
}
initiateThemeMarketplace() {
}
addIntallButton() {
const actionsContainer = this.contentWindow.document.getElementById("theme-actions");
if (!actionsContainer) {
console.error("ZenThemeMarketplaceChild: Could not find theme-actions container");
return;
}
}
};