mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
update docblock
...for typechecking.
This commit is contained in:
committed by
Paul O’Shannessy
parent
2900997b5f
commit
0790040aac
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user