UNPKG

pfam-molstar

Version:

A component for embedding molstar 3D viewer in Pfam

19 lines (16 loc) 457 B
import Molstar from "./molstar-component"; const componentName = "pfam-molstar-component"; const loadComponent = () => { if (customElements.get(componentName) === undefined) { customElements.define(componentName, Molstar); } }; // Conditional loading of polyfill if (window.customElements) { loadComponent(); } else { document.addEventListener("WebComponentsReady", () => { loadComponent(); }); } export default Molstar;