Repository navigation
Add {InteractionContentfulPaint|PerformanceSoftNavigation}.toJSON - #30334
Conversation
|
Tip: Review these changes grouped by change (recommended for most PRs), or grouped by feature (for large PRs). |
|
Yes this looks correct to me by spec. @mmocny why does Is it because |
|
This wasn't an explicit decision that I can recall, so could just be an oversight-- but I will investigate if it is correct to remove both, add both, or leave as is... |
|
And, depending on how that investigation does, I might have a similar question on LCP btw: https://w3c.github.io/largest-contentful-paint/#dom-largestcontentfulpaint-tojson :-) We might need to do a full audit of all Performance API specs. |
|
I think I need to add toJSON() to PerformanceSoftNavigation, as it doesn't just work via inheritance. I think that ICP having this explicitly defined was specifically because it evolved from LCP spec and so we inherited it. I'll put up a fix. (Also, the correct syntax should be |
|
Cool. Will add a note to myself to add to MDN (BCD and Content) once it makes it's way into the spec. Or @Elchi3 will the BCD side happen automatically with your collector? Any ideas why it didn't add the iCP and SoftNav ones or was I just too impatient? |
|
You were too impatient :) (or rather the browser-specs/webref projects were too slow adding the spec). If the IDLs get corrected in the specs, they will make their way through webref -> collector -> bcd. |
…nteractionContentfulPaint Under WebIDL § 3.7.7.1.1, subclasses of PerformanceEntry do not automatically include their own attributes in toJSON() through inheritance unless the subclass explicitly declares a default toJSON operation ([Default] object toJSON();). Without this, calling toJSON() on a PerformanceSoftNavigation instance only serializes the base PerformanceEntry properties, omitting navigationType, interactionId, and PaintTimingMixin attributes. This change: - Adds [Default] object toJSON(); to PerformanceSoftNavigation. - Updates InteractionContentfulPaint to include the [Default] extended attribute on toJSON(). - Adds corresponding prose to run default toJSON steps when toJSON() is called for both interfaces, matching sibling WebPerf specs. Original issue: mdn/browser-compat-data#30334
…nteractionContentfulPaint Under WebIDL § 3.7.7.1.1, subclasses of PerformanceEntry do not automatically include their own attributes in toJSON() through inheritance unless the subclass explicitly declares a default toJSON operation ([Default] object toJSON();). Without this, calling toJSON() on a PerformanceSoftNavigation instance only serializes the base PerformanceEntry properties, omitting navigationType, interactionId, and PaintTimingMixin attributes. This change: - Adds [Default] object toJSON(); to PerformanceSoftNavigation. - Updates InteractionContentfulPaint to include the [Default] extended attribute on toJSON(). - Adds corresponding prose to run default toJSON steps when toJSON() is called for both interfaces, matching sibling WebPerf specs. Original issue: mdn/browser-compat-data#30334
…nteractionContentfulPaint Under WebIDL § 3.7.7.1.1, subclasses of PerformanceEntry do not automatically include their own attributes in toJSON() through inheritance unless the subclass explicitly declares a default toJSON operation ([Default] object toJSON();). Without this, calling toJSON() on a PerformanceSoftNavigation instance only serializes the base PerformanceEntry properties, omitting navigationType, interactionId, and PaintTimingMixin attributes. This change: - Adds [Default] object toJSON(); to PerformanceSoftNavigation. - Updates InteractionContentfulPaint to include the [Default] extended attribute on toJSON(). - Adds corresponding prose to run default toJSON steps when toJSON() is called for both interfaces, matching sibling WebPerf specs. Original issue: mdn/browser-compat-data#30334
…nteractionContentfulPaint (#91) Under WebIDL § 3.7.7.1.1, subclasses of PerformanceEntry do not automatically include their own attributes in toJSON() through inheritance unless the subclass explicitly declares a default toJSON operation ([Default] object toJSON();). Without this, calling toJSON() on a PerformanceSoftNavigation instance only serializes the base PerformanceEntry properties, omitting navigationType, interactionId, and PaintTimingMixin attributes. This change: - Adds [Default] object toJSON(); to PerformanceSoftNavigation. - Updates InteractionContentfulPaint to include the [Default] extended attribute on toJSON(). - Adds corresponding prose to run default toJSON steps when toJSON() is called for both interfaces, matching sibling WebPerf specs. Original issue: mdn/browser-compat-data#30334
|
The lint check found auto-fixable issues. Apply suggested changes (attributed to |
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Summary
We missed this in #30195.
cc. @tunetheweb
Test results and supporting details
Discovered by the OWD BCD collector 10.20.8.
Related issues
#30195