Size limit to javascript [node].nodeValue field?

前端 未结 4 1789
梦如初夏
梦如初夏 2020-12-21 08:05

I\'m receiving XML data via an AJAX call. One of the tags has a large amount of text, roughly 4000-5000 characters. In Firefox, the field is being truncated around the 3000t

4条回答
  •  青春惊慌失措
    2020-12-21 08:21

    Check this. It says:

    "Also important to note is that although the specifications say that no matter how much text exists between tags, it should all be in one text node, in practice this is not always the case. In Opera 7-9.2x and Mozilla/Netscape 6+, if the text is larger than a specific maximum size, it is split into multiple text nodes. These text nodes will be next to each other in the childNodes collection of the parent element."

提交回复
热议问题