Text node maximum size

Atom RSS

This site heavily relies on bug reports created by its readers. Anyone can report a bug and be published.

Main navigation:




Search reports by browser:

Mozilla and Opera split up one huge text node into several smaller text nodes. Explorer Mac acts weirdly.

Maximum text node sizes:

Test page. Workaround is not included.
Reported by ppk.

Explorer Mac, Mozilla, Opera | Reported on 17 December 2004.

Comments

(Add your own)

Posted by Jonathan Buchanan on 17 December 2004

1

I noticed from Firefox's DOM Inspector that it splits the large text section up into 4K bytes, so by using firstChild[0], you're only getting the first of these. Calling normalize() on the node before processing it will force the browser to combine all the sibling text nodes in that element into one text node.

Some information on "normalize":
http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-normalize

function testTextNodes()
{
this.normalize();
//... as before
}

The test then displays 66250 for me before and after moving the text node in Firefox 1.0 (Win).

The problem still persists for me in Opera 7.60 (Win) build 7364c, though.

Posted by Mathieu Parent on 27 January 2005

2

Mozilla Bug: http://bugzilla.mozilla.org/show_bug.cgi?id=280026

Post a comment

Commenting guidelines:

  1. When quoting specs, articles or your own research, please include a URL of the document.
  2. Test your stuff. When reporting browser behaviour, make sure that your report is correct.

Yes