Files
parts_website/static/js/app.js
Teddy Middleton-Smith baa158fcd0 Feat(Security):
a. Update CORS settings
 b. Update session cookie settings
 c. Remove comments that expose project architecture (and that Claude made most of it :P)
2025-01-25 14:31:03 +00:00

52 lines
824 B
JavaScript

'use strict';
import DOM from './dom.js';
import Router from './router.js';
class App {
constructor() {
this.dom = new DOM();
this.router = new Router();
}
initialize() {
this.setupEventListeners();
this.start();
}
setupEventListeners() {
// document.addEventListener('click', this.handleGlobalClick.bind(this));
}
handleGlobalClick(event) {
}
start() {
this.initPageCurrent();
}
initPageCurrent() {
this.router.loadPageCurrent();
}
}
const app = new App();
function domReady(fn) {
if (document.readyState !== 'loading') {
fn();
} else {
document.addEventListener('DOMContentLoaded', fn);
}
}
domReady(() => {
app.initialize();
});
window.app = app;
export default app;