Create module to set up PerformanceObserver (#37807)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37807

We implemented `PerformanceObserver` but didn't create a `setUp*` module for it like we did for the rest of globals in RN.

This creates the module but doesn't enable it by default (until stable in OSS). We'll require this in a case by case basis for testing.

Changelog: [internal]

Reviewed By: rshest

Differential Revision: D46597766

fbshipit-source-id: 661d009754f4310c6b83483188ed020fc1d4d63b
This commit is contained in:
Rubén Norte
2023-06-12 09:11:58 -07:00
committed by Facebook GitHub Bot
parent ef5d92f648
commit 33b9c8e9e2
@@ -0,0 +1,16 @@
/**
* 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.
*
* @flow strict-local
* @format
*/
import {polyfillGlobal} from '../Utilities/PolyfillFunctions';
polyfillGlobal(
'PerformanceObserver',
() => require('../WebPerformance/PerformanceObserver').default,
);