From 64d4d7c1311295e352c86060f2bc949adaae3673 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Norte?= Date: Mon, 13 Apr 2026 03:55:39 -0700 Subject: [PATCH] Expose dispatchTrustedEvent and setEventInitTimeStamp in ReactNativePrivateInterface (#56417) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/56417 Changelog: [internal] The React Native renderer needs access to these internals to dispatch events under the new EventTarget-based event dispatching pipeline. Reviewed By: javache Differential Revision: D100462549 fbshipit-source-id: 0b4f9cb5900c6b48781a98edf431a6460d16709d --- .../ReactPrivate/ReactNativePrivateInterface.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/react-native/Libraries/ReactPrivate/ReactNativePrivateInterface.js b/packages/react-native/Libraries/ReactPrivate/ReactNativePrivateInterface.js index 6365f1bee48..385f5c92194 100644 --- a/packages/react-native/Libraries/ReactPrivate/ReactNativePrivateInterface.js +++ b/packages/react-native/Libraries/ReactPrivate/ReactNativePrivateInterface.js @@ -9,6 +9,8 @@ */ import typeof CustomEvent from '../../src/private/webapis/dom/events/CustomEvent'; +import typeof {setEventInitTimeStamp} from '../../src/private/webapis/dom/events/internals/EventInternals'; +import typeof {dispatchTrustedEvent} from '../../src/private/webapis/dom/events/internals/EventTargetInternals'; import typeof BatchedBridge from '../BatchedBridge/BatchedBridge'; import typeof legacySendAccessibilityEvent from '../Components/AccessibilityInfo/legacySendAccessibilityEvent'; import typeof TextInputState from '../Components/TextInput/TextInputState'; @@ -133,4 +135,12 @@ module.exports = { return require('../ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance') .getInternalInstanceHandleFromPublicInstance; }, + get dispatchTrustedEvent(): dispatchTrustedEvent { + return require('../../src/private/webapis/dom/events/internals/EventTargetInternals') + .dispatchTrustedEvent; + }, + get setEventInitTimeStamp(): setEventInitTimeStamp { + return require('../../src/private/webapis/dom/events/internals/EventInternals') + .setEventInitTimeStamp; + }, };