OpenC3/cosmos

View on GitHub
openc3/templates/tool_svelte/src/tool_name.js

Summary

Maintainability
A
30 mins
Test Coverage
import singleSpaSvelte from "single-spa-svelte";
import App from "./App.svelte";
import "../build/smui.css";

const svelteLifecycles = singleSpaSvelte({
  component: App,
  domElementGetter: function () {
    let elem = document.getElementById("openc3-tool");
    if (elem) {
      return elem;
    } else {
      return new HTMLElement();
    }
  },
});

export const { bootstrap, mount, unmount } = svelteLifecycles;