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

review of Navigation Timing's use of Web IDL

From: Cameron McCormack <cam@mcc.id.au>
Date: Fri, 18 Mar 2011 11:45:58 +1300
To: public-web-perf@w3.org
Message-ID: <20110317224558.GI1187@wok.mcc.id.au>
I gave myself ACTION-7 to review Navigation Timing’s use of Web IDL,
which I give here.

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.)

How mixin interfaces like WindowPerformance are written and handled in
Web IDL may change in the near future, which would you mean you’d write
it something like

  mixin interface WindowPerformance {
    readonly attribute Performance performance;
  };

  Window implements WindowPerformance;

but this wouldn’t have any practical effects on what you are aiming for
(i.e., a property named performance existing on the Window object).

I didn’t see any other issues.

-- 
Cameron McCormack ≝ http://mcc.id.au/
Received on Thursday, 17 March 2011 22:46:35 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 17 March 2011 22:46:38 GMT