mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
@@ -40,6 +40,10 @@ var setTextContent = function(node, text) {
|
||||
if (ExecutionEnvironment.canUseDOM) {
|
||||
if (!('textContent' in document.documentElement)) {
|
||||
setTextContent = function(node, text) {
|
||||
if (node.nodeType === 3) {
|
||||
node.nodeValue = text;
|
||||
return;
|
||||
}
|
||||
setInnerHTML(node, escapeTextContentForBrowser(text));
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user