Re: Super rough draft of Window spec

A few comments on this.

Regarding the comment on DocumentView, isn't that DocumentView
actually just the DOM2 Views extensions of Document. We have
DocumentStyle, DocumentEvent, DocumentRange, DocumentTraversal etc.
interfaces from other DOM2 specs, all of them in reality extending the
DOM Core Document interface for user agents that support them.

Also, I don't think self is readonly in user agents except iew today.

Similarly location can be set, and is treated as setting
location.href. Thus a setter is needed for it, on both document and
window interfaces.

I believe that you can find the following syntax for setInterval/Timeout:
        [string functionBody | function timerFunction],
        [anything milliseconds],
Where the actual handling if the first two arguments are not function
type and number type respectively is equivalent to the following:
        new Function(
            [string FunctionBody]),
        Number([anything milliseconds]));
....while no conversion is necessary if they are already function and
number types respectively. Also the values of arg0, arg1 ..., argn are
passed to the function at time of invokation.

A quick confirmation of this can be gotten by running this in the
location field:
     javascript:var i=0;setInterval(function(n){alert([n++,i++])},0x400,i);
If the user agent doesn't support the arguments passing only i will be
displayed in the array, never n. n will be passed the value of i at
the time of the call to the setTimeout/interval, so it will be 0 each
time and not incremented between calls.
David "liorean" Andersson

Received on Tuesday, 21 February 2006 14:36:55 UTC