W3C home > Mailing lists > Public > public-web-perf@w3.org > March 2011

Re: review of Navigation Timing's use of Web IDL

From: Cameron McCormack <cam@mcc.id.au>
Date: Fri, 18 Mar 2011 15:01:17 +1300
To: public-web-perf@w3.org
Message-ID: <20110318020117.GL1187@wok.mcc.id.au>
Cameron McCormack:
> The spec has
>   [Supplemental]
>   interface Window {
>     attribute Performance performance;
>   };
> but as plh pointed out, [Supplemental] is not (yet) defined in Web IDL.
> I would recommend writing this as:
>   [NoInterfaceObject]
>   interface WindowPerformance {
>     readonly attribute Performance performance;
>   };
>   Window implements WindowPerformance;
> which has the desired effect using existing functionality in Web IDL.
> (I think the attribute should be read only, too, if it doesn’t make
> sense to be able to assign to window.performance.)

As Ian pointed out to me on IRC, there is actually an observable
difference between the (currently undefined) top snippet and the one
just above.  For the former, the performance property will exist on
Window.prototype, while for the latter, it will exist on
Object.getPrototypeOf(window), instead (and
Object.getPrototypeOf(Object.getPrototypeOf(window)) ==

Once we have the mixin interface concept, then that'll let you do what
[Supplemental] wants to do currently, i.e. stick properties directly on

This all doesn’t particularly matter, since no browsers do the mixin
prototype object thing that Web IDL currently requires, so apologies for
the confusion.  It will be a very minor change for you to make once I’ve
made the relevant Web IDL edits, anyway.  Better advice for you then is
to just leave what you have for now and wait until Web IDL has changed.

Cameron McCormack ≝ http://mcc.id.au/
Received on Friday, 18 March 2011 02:01:56 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:04:30 UTC