MCPcopy
hub / github.com/anthonyshort/deku / toNative

Function toNative

lib/render.js:404–411  ·  view source on GitHub ↗

* Create a native element from a virtual element. * * @param {String} entityId * @param {String} path * @param {Object} vnode * * @return {HTMLDocumentFragment}

(entityId, path, vnode)

Source from the content-addressed store, hash-verified

402 */
403
404 function toNative (entityId, path, vnode) {
405 switch (nodeType(vnode)) {
406 case 'text': return toNativeText(vnode)
407 case 'empty': return toNativeEmptyElement(entityId, path)
408 case 'element': return toNativeElement(entityId, path, vnode)
409 case 'component': return toNativeComponent(entityId, path, vnode)
410 }
411 }
412
413 /**
414 * Create a native text element from a virtual element.

Callers 5

mountEntityFunction · 0.85
renderFunction · 0.85
toNativeElementFunction · 0.85
diffChildrenFunction · 0.85
replaceElementFunction · 0.85

Calls 4

toNativeTextFunction · 0.85
toNativeEmptyElementFunction · 0.85
toNativeElementFunction · 0.85
toNativeComponentFunction · 0.85

Tested by

no test coverage detected