[whatwg] Sandboxing scripts: call for a wider discussion

Jim Ley jim.ley at gmail.com
Mon Jan 23 03:28:31 PST 2006


On 1/23/06, Alexey Feldgendler <alexey at feldgendler.ru> wrote:
> On Mon, 23 Jan 2006 17:15:39 +0600, Lachlan Hunt
> <lachlan.hunt at lachy.id.au> wrote:
>
> > http://www.w3.org/TR/2001/WD-DOM-Level-2-HTML-20011210/html.html#ID-75233634
>
> I'm surprised. document.write is defined but it's substantially different
>  from what the browsers implement. DOM 2 says that write() can be called
> only between calls to open() and close(), and that a call to open() clears
> the existing content of the document.

That's because the existence of a global object called document that
points to the current document doesn't exist in any standard.

> This is very different from the
> current practice of calling write() without open() to inject unparsed HTML
> into an already-parsed document.

Er, no, no UA supports this, it supports it in HTML documents _that
are being parsed_ but not ones that are already parsed where
document.write performs an implied document.open() so content is
cleared.

Jim.



More information about the whatwg mailing list