diff --git a/src/to-vdom.js b/src/to-vdom.js index 4528c6f..2f0e4fb 100644 --- a/src/to-vdom.js +++ b/src/to-vdom.js @@ -11,7 +11,7 @@ export default function toVdom(node, visitor, h, options) { function walk(n, index, arr) { if (n.nodeType===3) { - let text = 'textContent' in n ? n.textContent : n.nodeValue || ''; + let text = n.data || ''; if (walk.options.trim!==false) { let isFirstOrLast = index===0 || index===arr.length-1; @@ -53,7 +53,7 @@ function getProps(attrs) { for (let i=0; i