Questions about generateUniqueID, getLoadState and getSelector
@tunetheweb some doubts i wanted to ask . somethigns i couldnt figure out while reading.
generateUniqueID() returns v6-${Date.now()}-${random} and that prefix has been bumped by hand every major v1 throuhg v6 ( most recently #764) . What consumse it? I'd have expected the version to live in the payload rather than inside the ID, so I assume theres a downstream reason for keeping it there
getLoadState() final return 'complete' is commented as only happening if the browser lacks the performance timeline but getNavigationEntry() also returns nothing when responseStart is 0 or bogus (the #137 #162 #275 cases), so attribution.loadState reports 'complete' even for shifts that happened during load. Is that acceptable noise, or am I misreading the fallback
getSelector() caps output at MAX_LEN = 100, but the guard is return sel || part on the first iteration sel is empty, so a single element whose own part exceeds the cap is returned whole. a typical utilityCSS element (div plus approcx 14 classes) gives a 141 char target. Is the cap intended to bound only the ancestor chain or should the leaf be truncated too?
Source: GoogleChrome/web-vitals