@connectifi/agent-web
Version:
A simple web implementation of a connectifi agent
2 lines • 700 B
JavaScript
;async function c(){try{await document.requestStorageAccess(),parent.postMessage({topic:"storage-access-granted"},"*")}catch{parent.postMessage({topic:"storage-access-denied"},"*")}}function s(){let e=document.createElement("button");e.title="request storage access",e.style.width="100%",e.style.height="100%",e.addEventListener("click",async a=>{a.preventDefault(),await c()});let t=document.createElement("div");t.style.backgroundImage="url('/signin.svg')",t.style.width="1rem",t.style.height="1rem",t.style.backgroundSize="contain",t.style.backgroundRepeat="no-repeat",e.appendChild(t),document.body.appendChild(e)}s();
//# sourceMappingURL=request-storage-access-iframe.bundle.cjs.map