-
Notifications
You must be signed in to change notification settings - Fork 426
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The Paint Timing API is now supported by Safari #139
Conversation
That is, the stable Safari that ships with iOS 14.5 or macOS 11.4.
BTW it seems a little flakey. I've a demo page here: https://www.tunetheweb.com/experiments/web-vitals/ And here's the results from Safari 14.1 desktop after several reloads: As you can see continually reloading the page sometimes leads to FCP being logged, but often doesn't. Any ideas why? Seems to be logged a bit more often in Safari Technology Preview (14.2) but still does miss it quite often. Reloading the page in Chrome, it looks to be consistently logged. Not sure if this should be raised as a separate issue, or whether it's a Safari issue, or an issue with the Web-Vitals library but thought I'd ask the question here first in case it influences the decision to merge this change or not. |
Not sure what call gives you this console message.... Calling this: |
It's this library that produces those logs. Agree it does appear to be there consistently (I added a script to the demo page to log the results of @philipwalton / @tomayac want me to raise a separate issue for this to move the discussion out of this PR? |
I'm yielding to Phil. Just bearer of the news here, not a subject matter expert… |
I don't have Safari 14.5 yet, but based on running the following in STP, it looks like the buffered flag is not supported: new PerformanceObserver(console.log).observe({type: 'paint', buffered: true}); |
AFAIK The |
@noamr the buffered flag is supported for new PerformanceObserver((l)=>console.log(l.getEntries())).observe({type:'resource', buffered: true}); Looks like it buffered support may have been implemented after paint timing was implemented though. @npm1 did you end up filing a bug for this that we can link to? If not, I can. |
Ah yes, Igalia did this after paint timing went in. Good to know! |
I haven't filed a bug on WebKit, but does seem like it was an omission. I can create a buffered flag test on fcp-only folder if that helps... |
That and a bug in webkit would probably help... |
Relevant GitHub issue: GoogleChrome/web-vitals#139 Change-Id: I2884dd4c3432920011e984f6a08ebaf6a2176b67
Relevant GitHub issue: GoogleChrome/web-vitals#139 Change-Id: I2884dd4c3432920011e984f6a08ebaf6a2176b67
Relevant GitHub issue: GoogleChrome/web-vitals#139 Change-Id: I2884dd4c3432920011e984f6a08ebaf6a2176b67 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2867865 Reviewed-by: Yoav Weiss <yoavweiss@chromium.org> Commit-Queue: Nicolás Peña Moreno <npm@chromium.org> Cr-Commit-Position: refs/heads/master@{#878531}
Relevant GitHub issue: GoogleChrome/web-vitals#139 Change-Id: I2884dd4c3432920011e984f6a08ebaf6a2176b67 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2867865 Reviewed-by: Yoav Weiss <yoavweiss@chromium.org> Commit-Queue: Nicolás Peña Moreno <npm@chromium.org> Cr-Commit-Position: refs/heads/master@{#878531}
#145 should address the lack of buffered support until https://bugs.webkit.org/show_bug.cgi?id=225305 is addressed. Once a version with that PR is released, I'll merge this PR. |
… test, a=testonly Automatic update from web-platform-tests [PaintTiming] Add fcp-only buffered flag test Relevant GitHub issue: GoogleChrome/web-vitals#139 Change-Id: I2884dd4c3432920011e984f6a08ebaf6a2176b67 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2867865 Reviewed-by: Yoav Weiss <yoavweiss@chromium.org> Commit-Queue: Nicolás Peña Moreno <npm@chromium.org> Cr-Commit-Position: refs/heads/master@{#878531} -- wpt-commits: c2f801a0f01edffed2e271530f23d6dae1f5277e wpt-pr: 28797
Patch for the buffered thingy: https://bugs.webkit.org/show_bug.cgi?id=225305 |
Relevant GitHub issue: GoogleChrome/web-vitals#139 Change-Id: I2884dd4c3432920011e984f6a08ebaf6a2176b67 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2867865 Reviewed-by: Yoav Weiss <yoavweiss@chromium.org> Commit-Queue: Nicolás Peña Moreno <npm@chromium.org> Cr-Commit-Position: refs/heads/master@{#878531} NOKEYCHECK=True GitOrigin-RevId: fdbdd8b448210f42e238a46700a6f910436a60bc
That is, the stable Safari that ships with iOS 14.5 or macOS 11.4.