<link rel="import" href="../element.html">

<script>
    /* globals MagnonElement */
    class MagnonGlobalStyle extends MagnonElement {
        constructor() {
            super({ shadow: false });
        }

        static get name() {
            return "magnon-global-style";
        }

        connectedCallback() {
            const template = this.root.querySelector("template");
            if (!template) return;

            document.body.appendChild(template.content.cloneNode(true).children[0]);
        }
    }

    MagnonGlobalStyle.init();
</script>

<link rel="import" href="../element.html">

<script>
    /* globals MagnonElement */
    class MagnonGlobalStyle extends MagnonElement {
        constructor() {
            super({ shadow: false });
        }

        static get name() {
            return "magnon-global-style";
        }

        connectedCallback() {
            const template = this.root.querySelector("template");
            if (!template) return;

            const append = () => {
                document.body.appendChild(template.content.cloneNode(true).children[0]);
            };

            if (document.readyState === "complete") append();
            else {
                window.addEventListener("DOMContentLoaded", () => append());
            }
        }
    }

    MagnonGlobalStyle.init();
</script>

Fix global styles failing to apply
Fix global styles failing to apply
