- From: Simon Pieters <simonp@opera.com>
- Date: Thu, 11 Aug 2011 16:03:19 +0200
- To: "Ian Hickson" <ian@hixie.ch>, "Jonas Sicking" <jonas@sicking.cc>
- Cc: public-script-coord@w3.org
On Thu, 21 Jul 2011 23:28:32 +0200, Jonas Sicking <jonas@sicking.cc> wrote: > 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. I tend to agree with Jonas. There's no point in hiding the interface name from scripts, it's just a source of potential bugs and confusion. As a data point, we have Location and WorkerLocation which also "look the same but are different". -- Simon Pieters Opera Software
Received on Thursday, 11 August 2011 14:03:26 UTC