Hi all,
I can't remember if we've discussed this before or not, but I would like
to see if there's a way we could allow consumers of RT to get notified
of new entries prior to their completion (eg before responseEnd is
set). Maybe as an optional argument to the PerformanceObserver interface?
Ideally, I would like to be notified of new entries as soon as startTime
is known.
One use case is to allow pages to monitor for new outgoing network
requests, which would also give you the ability to know how many
networking requests are in-flight. You could theoretically build a
"busy" indicator with this.
Specifically, what we want, is to be able to better monitor when all of
the resources triggered by a SPA soft navigation have completed. The
body 'onload' event is no longer relevant for SPA apps. Today we're
doing this by monitoring for changes to the DOM via MutationObserver and
hooking into onload/onerror events, which is not efficient. We also
cannot monitor all types of resources in this way (eg fonts).
Thoughts?
--
- Nic
http://nicj.net/
@NicJ