(Context: WICG/soft-navigations#65)
Today the mark paint timing steps will observe paint, compute a set of new painted images and text nodes, and finally create a flushPaintTimings callback.
Invoking that flushPaintTimings is needed for actual paint apis to "observe" paint steps.
But according to steps 11 and 12, on implementations that support presentation time, the actually flush happens "in parallel" after presentation time is known.
This causes some issues whenever PerformanceEntry creation requires reading some global state, which can change between paint steps and eventual presentation time processing.
For example:
- Capturing the
element's id, depends on element still being attached to DOM and the id attribute not changing
navigatonId is assigned when a PerformanceEntry is queued, and can change between paint and presentation time processing.
(Context: WICG/soft-navigations#65)
Today the mark paint timing steps will observe paint, compute a set of new painted images and text nodes, and finally create a
flushPaintTimingscallback.Invoking that
flushPaintTimingsis needed for actual paint apis to "observe" paint steps.But according to steps 11 and 12, on implementations that support presentation time, the actually flush happens "in parallel" after presentation time is known.
This causes some issues whenever PerformanceEntry creation requires reading some global state, which can change between paint steps and eventual presentation time processing.
For example:
element'sid, depends onelementstill being attached to DOM and theidattribute not changingnavigatonIdis assigned when a PerformanceEntry is queued, and can change between paint and presentation time processing.