Files
tubestation/dom/webidl/PerformancePaintTiming.webidl
Nazım Can Altınova 1676f50595 Bug 1965441 - Let PerformancePaintiming webidl interface have its own toJSON implementation r=webidl,smaug
Before this change we were reusing the toJSON implementation from the
PerformanceEntry entity which doesn't include the PaintTimingMixin.
Because of that, it wasn't adding the mixin attributes to the toJSON method.

This patch adds a default toJSON implementation specifically to this interface,
which properly adds the mixin attributes and serializes them.

This mixin was also added to the LargestContentfulPaint interface, but it
already has a toJSON method added to it, so we don't need to do it for that.

Differential Revision: https://phabricator.services.mozilla.com/D248660
2025-05-19 11:22:28 +00:00

20 lines
675 B
Plaintext

/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*
* The origin of this IDL file is
* https://w3c.github.io/paint-timing/#sec-PerformancePaintTiming
*
* Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
* liability, trademark and document use rules apply.
*/
[Exposed=(Window)]
interface PerformancePaintTiming : PerformanceEntry
{
[Default] object toJSON();
};
PerformancePaintTiming includes PaintTimingMixin;