Re: Clarification of issue in User Timing spec

On Wed, 2015-01-28 at 11:33 -0600, Eli Perelman wrote:
> In the *Exceptions* section of the User Timing spec for the mark method, it
> states:
> 
> "Throws a SYNTAX_ERR exception if the markName argument is the same name as
> an attribute in the PerformanceTiming interface."
> 
> In Gecko we implemented bug 1047878 [1] out-of-spec and added `toJSON` to
> the PerformanceTiming interface to get a JSON version of the timing
> attributes. Following this reasoning, then `toJSON` being a
> PerformanceTiming attribute may need to throw a SYNTAX_ERR when used as a
> performance marker name:
> 
> performance.mark('toJSON');
> 
> So we need some clarification of the spec to determine whether all
> attributes of the PerformanceTiming interface should throw if used as
> marker names, or only those specifically defined by the spec.

Given that we don't want to rely on the PerformanceTiming interface
anymore in the future (it's not part of Navigation Timing 2), the entire
restriction ought to be removed imho, ie all of the following calls
ought to work:
 performance.mark("toJSON");
 performance.mark("entryType");
 performance.mark("navigationStart");

There is a performanceEntry object underneath and it stores the name in
the markName attribute anyway. No risks of conflicting with attributes
or methods of the object.

Philippe

[1] http://w3c.github.io/navigation-timing/

Received on Friday, 30 January 2015 16:11:48 UTC