link elements from this.window.manager to this.window

for convenience
This commit is contained in:
buzz-lightsnack-2007 2024-05-15 09:51:02 +08:00
parent ddb455db28
commit 8db6ca82a6

View file

@ -7,9 +7,14 @@ import windowman from "/scripts/GUI/builder/windowman.js";
export default class Page { export default class Page {
constructor () { constructor () {
this.window = window; this.window = window;
this.window[`manager`] = new windowman(); this.window[`manager`] = new windowman();
(this.window[`manager`]) ? this.window.manager.sync() : false;
// Link the elements from this.window.manager to this.window for convenience later on.
if ((this.window[`manager`])) {
this.window.manager.sync();
Object.assign(this.window, this.window[`manager`]);
}
document.addEventListener("DOMContentLoaded", function () { document.addEventListener("DOMContentLoaded", function () {
M.AutoInit(); M.AutoInit();