MCPcopy Create free account
hub / github.com/microsoft/SandDance / domCreate

Function domCreate

docs/tests/v2/es6/js/sanddance.js:100518–100524  ·  view source on GitHub ↗
(doc, tag, ns)

Source from the content-addressed store, hash-verified

100516
100517// create a new DOM element
100518function domCreate(doc, tag, ns) {
100519 if (!doc && typeof document !== 'undefined' && document.createElement) {
100520 doc = document;
100521 }
100522
100523 return doc ? ns ? doc.createElementNS(ns, tag) : doc.createElement(tag) : null;
100524} // find first child element with matching tag
100525
100526
100527function domFind(el, tag) {

Callers 1

domChildFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected