w3c / longtasks

Long Task API
https://w3c.github.io/longtasks/
Other
246 stars 32 forks source link

Overloading PerformanceEntry #133

Open Elchi3 opened 7 months ago

Elchi3 commented 7 months ago

Why is this specification overloading PerformanceEntry in the IDL? E.g.:

interface PerformanceLongTaskTiming : PerformanceEntry {
/* Overloading PerformanceEntry */
    readonly attribute DOMHighResTimeStamp startTime;
    readonly attribute DOMHighResTimeStamp duration;
    readonly attribute DOMString name;
    readonly attribute DOMString entryType;
}

For documentation tooling this means that there are now distinct startTime, duration, name, entryType properties for the PerformanceLongTaskTiming, TaskAttributionTiming, PerformanceLongAnimationFrameTiming, PerformanceScriptTiming interfaces. Previously these were just documented with the PerformanceEntry interface once for all.

It seems that no other Performance spec does this. So, for our tooling it means that LargestContentfulPaint, LayoutShift, PerformanceElementTiming, PerformanceEventTiming, PerformanceMark, PerformanceMeasure, PerformancePaintTiming, etc. etc. can all refer to PerformanceEntry for these properties as they are not appearing as "overloading" in their IDLs again. That seems inconsistent with what this spec is doing as of https://github.com/w3c/longtasks/commit/61a67ee58896d6e6da4281db6cbb17e9ac38eecc. Maybe I'm missing something, though.

noamr commented 7 months ago

Will fix this once #132 is done