import { TaskFlow } from "./utils/TaskFlow.js"; document.addEventListener('DOMContentLoaded', () => { try { const container = document.createElement('div'); document.body.appendChild(container); const shadowRoot = container.attachShadow({ mode: 'open' }); const uiContainer = document.createElement('div'); const style = document.createElement('style'); shadowRoot.appendChild(style); const cssPath = `${window.location.origin}/js/ia-form-filler/styles/style.css`; // Fetch e inietta il CSS dal file esterno fetch(cssPath) .then(response => response.text()) .then(css => { style.textContent = css; uiContainer.style.cssText = 'position: absolute; top: 0; left: 0; z-index: 9999;'; shadowRoot.appendChild(uiContainer); TaskFlow.run(uiContainer); }) .catch(error => { console.error("Errore durante il caricamento del CSS:", error); }); } catch (error) { console.error("Errore durante il caricamento di TaskFlow:", error); } });