Intent to Implement and Ship: PerformanceObserver.supportedEntryTypes

71 views
Skip to first unread message

n...@chromium.org

unread,
Dec 4, 2018, 11:46:12 AM12/4/18
to blink-dev

Contact emails

n...@chromium.org


Spec

https://w3c.github.io/performance-timeline/#supportedentrytypes-attribute


TAG review process is being skipped because this is a small addition to an existing API.


Summary

PerformanceObserver.supportedEntryTypes provides an easy way to feature detect the entry types that are implemented in a web browser. It also allows developers to discover new entry types. The list is returned in alphabetical order. For example, in Chrome, you could get [‘longtask’, ‘mark’, ‘measure’, ‘navigation’, ‘paint’, ‘resource’, ‘taskattribution’].


Motivation

We’d like to make feature detection less hacky. supportedEntryTypes also provides discoverability. See https://github.com/w3c/performance-timeline/issues/77


Risks

Interoperability and Compatibility

Based on https://docs.google.com/document/d/e/2PACX-1vRdJ0Infp2HBESEk2v_1-2kJAEehQkgExlwJTrqxqrvisx8XLAGRYWQiCBHXXqBDCyl2cNp03rsU09g/pub#h.ez8q3dhgycc and pull request https://github.com/w3c/performance-timeline/pull/108:


Edge: Cautious support

Firefox: Cautious support

Safari: Cautious support - suggested doing PerformanceObserver.supports(type). We did not go with this option because it does not provide discoverability.

Web / Framework developers: support.


Ergonomics

There are ergonomics improvements since it allows easy feature detection.


Activation

It can be easily used via Javascript.


Is this feature supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

Yes.


Debuggability

Easy debuggability: PerformanceObserver.supportedEntryTypes in Javascript.


Is this feature fully tested by web-platform-tests? Link to test suite results from wpt.fyi.

I’m doing WPT tests and the implementation in the same CL.


Entry on the feature dashboard

https://www.chromestatus.com/feature/6737857909620736


Requesting approval to ship?

Yes.


Daniel Bratell

unread,
Dec 4, 2018, 12:48:26 PM12/4/18
to blink-dev, n...@chromium.org
Small (useful and mostly harmless) addition to an exisiting API. 

LGTM1 

/Daniel
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/240e82f9-e24a-4800-a1a3-6dce832ff558%40chromium.org.



--
/* Opera Software, Linköping, Sweden: CET (UTC+1) */

Chris Harrelson

unread,
Dec 4, 2018, 1:42:03 PM12/4/18
to Daniel Bratell, blin...@chromium.org, n...@chromium.org

Mike West

unread,
Dec 5, 2018, 5:53:47 AM12/5/18
to Chris Harrelson, Daniel Bratell, blink-dev, n...@chromium.org

Joe Medley

unread,
Dec 5, 2018, 10:56:16 AM12/5/18
to n...@chromium.org, blink-dev
Do you have a tracking bug for this?
Joe Medley | Technical Writer, Chrome DevRel | jme...@google.com | 816-678-7195
If an API's not documented it doesn't exist.


Nicolás Peña

unread,
Dec 5, 2018, 11:04:29 AM12/5/18
to Joe Medley, n...@chromium.org, blin...@chromium.org
I've updated the ChromeStatus entry (I thought I had put the bug, sorry).

Boris Zbarsky

unread,
Mar 26, 2019, 11:55:52 PM3/26/19
to n...@chromium.org, blink-dev
On 12/4/18 11:46 AM, n...@chromium.org wrote:
> TAG review process is being skipped because this is a small addition to
> an existing API.

This was apparently missed, but this API as shipped in Chrome violates
the third bullet point of
<https://w3ctag.github.io/design-principles/#attributes-like-data>.

If the TAG review process is going to be skipped, may suggest at least
comparing what change is being proposed to that document in the future?

-Boris

n...@chromium.org

unread,
Mar 27, 2019, 2:17:19 PM3/27/19
to blink-dev, n...@chromium.org
I'll send a PR to modify the description of the attribute getter so it does not return a new copy every time, and will change Chrome implementation accordingly. Also replied at https://github.com/w3c/performance-timeline/issues/117 and https://github.com/w3c/performance-timeline/issues/77.

Boris Zbarsky

unread,
Mar 27, 2019, 2:42:26 PM3/27/19
to n...@chromium.org, blink-dev
On 3/27/19 2:17 PM, n...@chromium.org wrote:
> I'll send a PR to modify the description of the attribute getter so it
> does not return a new copy every time, and will change Chrome
> implementation accordingly.

Thank you, much appreciated.

-Boris
Reply all
Reply to author
Forward
0 new messages