update docblock

...for typechecking.
This commit is contained in:
Jason Bonta
2014-02-20 16:55:01 -08:00
committed by Paul O’Shannessy
parent 2900997b5f
commit 0790040aac
+12 -6
View File
@@ -57,18 +57,24 @@ function insertChildAt(parentNode, childNode, index) {
}
}
/**
* Sets the text content of `node` to `text`.
*
* @param {DOMElement} node Node to change
* @param {string} text New text content
*/
var updateTextContent;
if (textContentAccessor === 'textContent') {
/**
* Sets the text content of `node` to `text`.
*
* @param {DOMElement} node Node to change
* @param {string} text New text content
*/
updateTextContent = function(node, text) {
node.textContent = text;
};
} else {
/**
* Sets the text content of `node` to `text`.
*
* @param {DOMElement} node Node to change
* @param {string} text New text content
*/
updateTextContent = function(node, text) {
// In order to preserve newlines correctly, we can't use .innerText to set
// the contents (see #1080), so we empty the element then append a text node