Dosiero demo: UMD module

Demo only. Everything you upload is visible to every other visitor of this demo, and is deleted again within minutes. Actions are logged, including your IP address. Do not upload anything private, unlawful, or that you are not entitled to share.

The same thing without a build step or module support: a plain <script> tag. The UMD build puts the library on the global dosiero object, so the only difference from the ES module demo is how Dosiero is reached.

Integration

<iframe id="iframe1" style="width:100%;max-width:900px;height:300px"></iframe>

<script src="/dosiero/dosiero.umd.min.js"></script>
<script>
    document.addEventListener('DOMContentLoaded', () => {
        let Dosiero = dosiero.Dosiero;
        new Dosiero({
            mode: 'iframe',
            endpoint: window.location.origin + '/endpoint/index.php',
            iframe: document.getElementById('iframe1'),
        }).open();
    });
</script>

The theme is found without configuration here too, but by a different route: the UMD build has no import.meta.url, so it reads document.currentScript.src while the script is running. That is also why the <script> tag must not be async or defer — by the time a deferred script executes, currentScript is already empty and the location can no longer be derived. Set assetsUrl if you need to load it that way.

back