MCPcopy
hub / github.com/shipshapecode/shepherd / h

Function h

shepherd.js/src/utils/dom.ts:9–18  ·  view source on GitHub ↗
(
  tag: string,
  attrs?: Attrs | null,
  ...children: Child[]
)

Source from the content-addressed store, hash-verified

7 * Null/undefined/false attribute values are skipped.
8 */
9export function h(
10 tag: string,
11 attrs?: Attrs | null,
12 ...children: Child[]
13): HTMLElement {
14 const el = document.createElement(tag);
15 applyAttrs(el, attrs);
16 appendChildren(el, children);
17 return el;
18}
19
20/**
21 * Create an SVG element with attributes and children.

Callers 8

createShepherdElementFunction · 0.90
createShepherdButtonFunction · 0.90
createShepherdFooterFunction · 0.90
createShepherdTextFunction · 0.90
createShepherdTitleFunction · 0.90
createShepherdHeaderFunction · 0.90
createShepherdContentFunction · 0.90
createShepherdCancelIconFunction · 0.90

Calls 2

applyAttrsFunction · 0.85
appendChildrenFunction · 0.85

Tested by

no test coverage detected