MCPcopy Create free account
hub / github.com/CoderLine/alphaTab / mount

Function mount

packages/playground/src/util/Dom.ts:59–66  ·  view source on GitHub ↗
(container: HTMLElement, selector: string, component: T)

Source from the content-addressed store, hash-verified

57}
58
59export function mount<T extends Mountable>(container: HTMLElement, selector: string, component: T): T {
60 const placeholder = container.querySelector(selector);
61 if (!placeholder) {
62 throw new Error(`mount: placeholder '${selector}' not found in container`);
63 }
64 placeholder.replaceWith(component.root);
65 return component;
66}

Callers 10

constructorMethod · 0.90
constructorMethod · 0.90
constructorMethod · 0.90
constructorMethod · 0.90
constructorMethod · 0.90
constructorMethod · 0.90
constructorMethod · 0.90
constructorMethod · 0.90
constructorMethod · 0.90
constructorMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected