/
githubmr
/
facebook-react-native
Обзор
Документация
Войти
/
githubmr
/
facebook-react-native
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
main
packages/react-native/src/private/setup/setUpMutationObserver.js
31 строка
688 B
Rubén Norte
Expose NodeList and MutationRecord in global scope (#47759)
20 ноя 2024, 21:00
20 ноя 2024, 21:00
43554b5
Код
Авторство
О чём код?
/** * 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 '../../../Libraries/Utilities/PolyfillFunctions'; let initialized = false; export default function setUpMutationObserver() { if (initialized) { return; } initialized = true; polyfillGlobal( 'MutationObserver', () => require('../webapis/mutationobserver/MutationObserver').default, ); polyfillGlobal( 'MutationRecord', () => require('../webapis/mutationobserver/MutationRecord').default, ); }