innerText auto truncating long text inside a DOM element <p>I am trying to access the content inside a <strong>td</strong> element through the JavaScript <strong>innerText</strong> property (inside an excel VBA macro). It works perfectly for all cases except for this one case where the text inside the <strong>td</strong> element is very long (greater than 85982 characters).</p> <p>Upon inspection of the text extracted by innerText, I found that innerText seems to be truncating the text after a certain length. Note that this doesn't happen for other cases where the text size is small.</p> <p>Also, it seems that Mozilla's <strong>textContent</strong> property has a similar problem as well. I tried accessing the truncated part of the text using the developer console in Firefox for the aforementioned DOM element, but it seems that text isn't there in the extracted content (but the not truncated text is there - just like with innerText).</p> <p>Does anyone know how to bypass this restriction? Is there some internal limit on these functions?</p> <p>Here's my VBA code that has this problem:</p> <pre><code>MyInnerText = objElement.ChildNodes(3).innerText </code></pre> <p>Here's an equivalent code run in the Firefox console which has the same problem:</p> <pre><code>var t = document.getElementsByName("chapter11")[0].parentNode.children[3].textContent; t.match("some text that is in the part being truncated."); </code></pre> <p>For Firefox, this problem seems to go away if I inspect the element, and click "Show all 3396" nodes. After those nodes are visible, the textContent does not truncate the text anymore.</p> <p>Please do note that I want to be able to extract the text from inside a VBA script using the Internet Explorer object.</p>