- From: Garrett Smith <dhtmlkitchen@gmail.com>
- Date: Wed, 14 Nov 2007 14:00:17 -0800
- To: "David Hyatt" <hyatt@apple.com>
- Cc: "Simon Pieters" <simonp@opera.com>, public-html <public-html@w3.org>
White-space should not be ignored. <div id='pre'> hello, world </div> If whitespace skipped in parsing, then it's not part of the document; css white-space can't work if the expected white-space is dropped. pre.style.whiteSpace = "pre"; The same is true for innerHTML -- or innerXML -- I'm not debatingthe name right now. If <div id="pre"></div> pre.innerHTML = "Gorilla \n Snake"; This may seem blatantly obvious to some, but not to microsoft and the DOM Scripter Task Force. Maybe they like getting child elements, next sibling elements, and don't want to worry about text nodes. maybe, element.getChildElements() element.getNextSiblingElement() element.getPreviousSiblingElement() Garrett On Nov 14, 2007 12:49 PM, David Hyatt <hyatt@apple.com> wrote: > > Have you tested with Safari 3? We changed our behavior from Safari 2. > > dave > > > On Nov 14, 2007, at 11:59 AM, Simon Pieters wrote: > > > > > It appears that some sites use document.documentElement.firstChild > > and expect it to be the head element even if there was whitespace > > before the <head> tag. > > > > Safari seems to drop whitespace before the <head> tag. Firefox > > seems to insert any whitespace before the <head> tag in the head > > element, even if it was also before the <html> tag or before the > > doctype, and it also does so with comments. IE seems to drop > > whitespace and put comments before the <html> tag as siblings to > > the root element and after as children of the head element. Opera > > currently does what HTML5 says, and it has caused some compat > > problems. > > > > -- > > Simon Pieters > > Opera Software > > > > > -- Programming is a collaborative art.
Received on Wednesday, 14 November 2007 22:00:29 UTC