MCPcopy Create free account
hub / github.com/Lucifier129/react-lite / getMarkupWrap

Function getMarkupWrap

examples/simple/react.js:18142–18156  ·  view source on GitHub ↗

* Gets the markup wrap configuration for the supplied `nodeName`. * * NOTE: This lazily detects which wraps are necessary for the current browser. * * @param {string} nodeName Lowercase `nodeName`. * @return {?array} Markup wrap configuration, if applicable.

(nodeName)

Source from the content-addressed store, hash-verified

18140 * @return {?array} Markup wrap configuration, if applicable.
18141 */
18142function getMarkupWrap(nodeName) {
18143 !!!dummyNode ? "development" !== 'production' ? invariant(false, 'Markup wrapping node not initialized') : invariant(false) : undefined;
18144 if (!markupWrap.hasOwnProperty(nodeName)) {
18145 nodeName = '*';
18146 }
18147 if (!shouldWrap.hasOwnProperty(nodeName)) {
18148 if (nodeName === '*') {
18149 dummyNode.innerHTML = '<link />';
18150 } else {
18151 dummyNode.innerHTML = '<' + nodeName + '></' + nodeName + '>';
18152 }
18153 shouldWrap[nodeName] = !dummyNode.firstChild;
18154 }
18155 return shouldWrap[nodeName] ? markupWrap[nodeName] : null;
18156}
18157
18158module.exports = getMarkupWrap;
18159},{"129":129,"143":143}],140:[function(_dereq_,module,exports){

Callers 2

react.jsFile · 0.85
createNodesFromMarkupFunction · 0.85

Calls 1

invariantFunction · 0.70

Tested by

no test coverage detected