org.foam.orion.client/usecasePlugin/web/orion/webui/littlelib.js
/**
	 * Performs substitution of strings into textContent within the given node and its descendants. An occurrence of <code>${n}</code>
	 * in text content will be replaced with the string <code>messages[n]</code>.
	 * <p>This function is recommended for binding placeholder text in template-created DOM elements to actual display strings.</p>
	 * @name orion.webui.littlelib.processTextNodes
	 * @function
	 * @param {Node} node The node to perform replacement under.
	 * @param {String[]} messages The replacement strings.
	 */
Performs substitution of strings into textContent within the given node and its descendants. An occurrence of ${n}
in text content will be replaced with the string messages[n].
This function is recommended for binding placeholder text in template-created DOM elements to actual display strings.
@name orion.webui.littlelib.processTextNodes
@function
@param {Node} node The node to perform replacement under.
@param {String[]} messages The replacement strings.
Performs substitution of strings into textContent within the given node and its descendants . An occurrence of $ { n } in text content will be replaced with the string messages [ n ] . This function is recommended for binding placeholder text in template - created DOM elements to actual display strings . @name orion . webui . littlelib . processTextNodes @function @param { Node } node The node to perform replacement under . @param { String [] } messages The replacement strings .
function processTextNodes(node, messages) {
		processNodes(node, function(targetNode, matches) {
			var replaceText = messages[matches[1]] || matches[1];
			targetNode.parentNode.replaceChild(document.createTextNode(replaceText), targetNode);
		});
	}
function processTextNodes ( node , messages ) { processNodes ( node , function ( targetNode , matches ) { var replaceText = messages [ matches [ 1 ] ] || matches [ 1 ] ; targetNode . parentNode . replaceChild ( document . createTextNode ( replaceText ) , targetNode ) ; } ) ; }
Performs substitution of strings into textContent within the given node and its descendants.
Performs substitution of strings into textContent within the given node and its descendants .