MCPcopy Index your code
hub / github.com/microsoft/SandDance / addHeader

Function addHeader

packages/sanddance/src/headers.ts:23–27  ·  view source on GitHub ↗
(element: HTMLElement, header: string)

Source from the content-addressed store, hash-verified

21}
22
23function addHeader(element: HTMLElement, header: string) {
24 const h = document.createElement('h4');
25 h.innerHTML = header;
26 element.insertAdjacentElement('beforebegin', h);
27}
28
29function existingHeader(element: HTMLElement, header: string) {
30 const { previousElementSibling } = element;

Callers 1

conditionalHeaderFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected