mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
3aea05651d
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/35771 [Changelog][Internal] Based on the internal discussion, we don't want to report `first-input` event types for RN (just use plain `event` instead), in the way that [Event Timing API standard suggests](https://www.w3.org/TR/event-timing), as this is doesn't have that clear semantics in the context of RN, also to keep it simpler. Reviewed By: rubennorte Differential Revision: D42341923 fbshipit-source-id: eff2487dee17ef082604e4c807b4d41485328114
39 lines
1019 B
JavaScript
39 lines
1019 B
JavaScript
/**
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @format
|
|
* @flow strict
|
|
*/
|
|
|
|
import type {HighResTimeStamp} from './PerformanceEntry';
|
|
|
|
import {PerformanceEntry} from './PerformanceEntry';
|
|
|
|
export class PerformanceEventTiming extends PerformanceEntry {
|
|
processingStart: HighResTimeStamp;
|
|
processingEnd: HighResTimeStamp;
|
|
interactionId: number;
|
|
|
|
constructor(init: {
|
|
name: string,
|
|
startTime?: HighResTimeStamp,
|
|
duration?: HighResTimeStamp,
|
|
processingStart?: HighResTimeStamp,
|
|
processingEnd?: HighResTimeStamp,
|
|
interactionId?: number,
|
|
}) {
|
|
super({
|
|
name: init.name,
|
|
entryType: 'event',
|
|
startTime: init.startTime ?? 0,
|
|
duration: init.duration ?? 0,
|
|
});
|
|
this.processingStart = init.processingStart ?? 0;
|
|
this.processingEnd = init.processingEnd ?? 0;
|
|
this.interactionId = init.interactionId ?? 0;
|
|
}
|
|
}
|