2025-11-09 23:29:07 +01:00
|
|
|
import { RBoxApp } from './components/rbox-app.js';
|
|
|
|
|
|
|
|
|
|
// Define the custom element
|
|
|
|
|
customElements.define('rbox-app', RBoxApp);
|
|
|
|
|
|
|
|
|
|
// Instantiate the main application class
|
|
|
|
|
const app = new RBoxApp();
|
|
|
|
|
|
|
|
|
|
// Append the app to the body (if not already in index.html)
|
|
|
|
|
// document.body.appendChild(app);
|
|
|
|
|
|
|
|
|
|
// Register service worker for PWA
|
|
|
|
|
if ('serviceWorker' in navigator) {
|
|
|
|
|
window.addEventListener('load', () => {
|
2025-11-10 15:46:40 +01:00
|
|
|
navigator.serviceWorker.register('/static/service-worker.js');
|
2025-11-09 23:29:07 +01:00
|
|
|
});
|
|
|
|
|
}
|