W3C home > Mailing lists > Public > public-script-coord@w3.org > July to September 2011

Re: Vestiges of [Supplemental]

From: Jonas Sicking <jonas@sicking.cc>
Date: Thu, 21 Jul 2011 14:28:32 -0700
Message-ID: <CA+c2ei9c0ObKW2HxaK=Vc7d2nt1E3wTddoC6nOApJVruhShNGA@mail.gmail.com>
To: Ian Hickson <ian@hixie.ch>
Cc: public-script-coord@w3.org
On Wed, Jul 20, 2011 at 7:52 PM, Ian Hickson <ian@hixie.ch> wrote:
> On Wed, 20 Jul 2011, Jonas Sicking wrote:
>>
>> No other interface that I can think of has this sort of "dynamic"
>> behavior depending on which global scope it is available in.
>
> The Window global object is different based on whether it was invoked from
> showModalDialog() or not.

This seems like an equally bad idea (if not worse since a single
script can reach two types of Window interface objects). Why couldn't
the properties that showModalDialog needs simply be properties on the
instance object directly?

> In any case, the idea is just that workers should always look the same, so
> that libraries used in shared workers and dedicated workers work fine
> either way, with only the bits that actually matter being different.

They should look the same except be different in some ways? ;-)

You'll always be able to check if an object is the global scope by
checking "x instanceof WorkerGlobalScope". The fact that they'll have
different classes seems like a good thing since they in fact have
different APIs.

/ Jonas
Received on Thursday, 21 July 2011 21:29:37 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 May 2013 19:30:04 UTC