W3C home > Mailing lists > Public > public-html@w3.org > April 2009

Re: Flushing trailing text in document.write()

From: Ian Hickson <ian@hixie.ch>
Date: Sun, 26 Apr 2009 22:47:19 +0000 (UTC)
To: Henri Sivonen <hsivonen@iki.fi>
Cc: HTML WG <public-html@w3.org>
Message-ID: <Pine.LNX.4.62.0904262216130.10370@hixie.dreamhostps.com>
On Thu, 19 Mar 2009, Henri Sivonen wrote:
> While fixing an issue related to flushing elements so that gEBI can see 
> elements that were document.written immediately before the gEBI call, it 
> occurred to me to test the flushing of trailing text.
> Demos:
> http://hsivonen.iki.fi/test/moz/flushing-document-written-text.html
> http://hsivonen.iki.fi/test/moz/flushing-document-written-text-no-alert.html
> Firefox 3, WebKit trunk, Opera 10, IE8 (IE8 standards mode) and IE7 
> (standards mode) all flush the document.written element node to the DOM 
> before the gEBI.
> WebKit and Opera don't flush the trailing text, a behavior that flows 
> naturally from an implementation that has a lazily flushed text 
> accumulation buffer in the tree builder.

It's possible to have a text accumulation buffer in the tree builder 
without needing to flush it; just use the current text node's own buffer. 
(I believe this gets you the Firefox behaviour pretty cheaply.)

> In any case, the implementation requirements aren't obvious from the 
> spec text. Even if the specced behavior stays as is, it would be good to 
> draw attention to the implications in this case.

Could you elaborate on how it's not obvious?

Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Sunday, 26 April 2009 22:47:55 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:15:44 UTC