Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/improsocial/impro
An extensible Bluesky client for web impro.social
Something went wrong. Try again.
550 B · 22 lines
JavaScript
1234567891011121314151617181920212223import { kebabCase } from "/js/utils.js";
export class Component extends HTMLElement { static register() { const tagName = kebabCase(this.name); try { customElements.define(tagName, this); } catch (e) { console.error(`Could not register component ${tagName}`, e); throw e; } }}
export function getChildrenFragment(node) { const fragment = document.createDocumentFragment(); const children = [...node.childNodes]; children.forEach((child) => { fragment.appendChild(child); }); return fragment;}