diff --git a/src/browser/dom/DOMChildrenOperations.js b/src/browser/dom/DOMChildrenOperations.js index ad1939cb43..8326e3c121 100644 --- a/src/browser/dom/DOMChildrenOperations.js +++ b/src/browser/dom/DOMChildrenOperations.js @@ -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