- From: Alex Russell <notifications@github.com>
- Date: Fri, 18 Aug 2017 05:29:55 -0700
- To: w3ctag/design-reviews <design-reviews@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3ctag/design-reviews/issues/188/323340707@github.com>
Would also like to see an explainer; we [recently put together a dummy outline that could help in drafting yours](https://docs.google.com/document/d/1cJs7GkdQolqOHns9k6v1UjCUb_LqTFVjZM-kc3TbNGI/edit?usp=sharing) Would also be good to see discussion of security and privacy considerations in the draft spec. In terms of the design, a few questions: - The encoding for these values seems very one-off; does it share a common grammar with other systems (e.g., CSP)? Could it possibly use [JSON](http://httpwg.org/http-extensions/jfv.html)? - The exact parsing semantics of the `metric-value` (and reflection back to JS) seem ambiguous to me. No formalism (or JS conversion) are offered in the text, only the note that they must be representable as a double, but that leaves a lot of room for interpretation. I'd like to see specific numeric conversion steps outlined. - The example code in the spec uses a confusing mix of old and new syntax. A fully modern version might read: ```js // Example 2 // serverTiming entries can live on 'navigation' and 'resource' entries ['navigation', 'resource'].forEach((entryType) => { let entries = performance.getEntriesByType(entryType); for(let { name: url, serverTiming } of entries) { // iterate over the serverTiming array; only the slow ones for(let { name, duration, description } of serverTiming.filter(t => { t.duration > 200 }) { console.info('Slow server-timing entry =', JSON.stringify({url, entryType, name, duration, description}, null, 2)) } } ``` -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/w3ctag/design-reviews/issues/188#issuecomment-323340707
Received on Friday, 18 August 2017 12:30:18 UTC