mirror of
https://github.com/zen-browser/components.git
synced 2025-07-08 16:30:01 +02:00
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:
parent
ccea9cbae7
commit
dba14de44c
2 changed files with 31 additions and 0 deletions
5
src/ZenThemeMarketplace.mjs
Normal file
5
src/ZenThemeMarketplace.mjs
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
|
||||||
|
const gZenThemeMarketplace = {
|
||||||
|
init() {
|
||||||
|
},
|
||||||
|
};
|
26
src/actors/ZenThemeMarketplaceChild.sys.mjs
Normal file
26
src/actors/ZenThemeMarketplaceChild.sys.mjs
Normal 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
Loading…
Add table
Add a link
Reference in a new issue