Commit 98ce535
authored
[RN] Expose event as a global variable during dispatch (facebook#35913)
## Summary
This PR updates the event dispatching logic in React Native to expose
the dispatched event in the global scope as done on Web
(https://dom.spec.whatwg.org/#concept-event-listener-inner-invoke) and
in the new implementation of `EventTarget` in React Native
(https://github.com/facebook/react-native/blob/d1b2ddc9cb4f7b4cb795fed197347173ed5c4bfb/packages/react-native/src/private/webapis/dom/events/EventTarget.js#L372).
## How did you test this change?
Added unit tests1 parent a48e9e3 commit 98ce535
File tree
2 files changed
+15
-1
lines changed- packages/react-native-renderer/src
- __tests__
- legacy-events
2 files changed
+15
-1
lines changedLines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1099 | 1099 | | |
1100 | 1100 | | |
1101 | 1101 | | |
| 1102 | + | |
| 1103 | + | |
1102 | 1104 | | |
1103 | 1105 | | |
1104 | 1106 | | |
| |||
1110 | 1112 | | |
1111 | 1113 | | |
1112 | 1114 | | |
| 1115 | + | |
| 1116 | + | |
1113 | 1117 | | |
1114 | 1118 | | |
1115 | 1119 | | |
| |||
1123 | 1127 | | |
1124 | 1128 | | |
1125 | 1129 | | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
1126 | 1133 | | |
1127 | 1134 | | |
1128 | 1135 | | |
| |||
1150 | 1157 | | |
1151 | 1158 | | |
1152 | 1159 | | |
1153 | | - | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
1154 | 1163 | | |
1155 | 1164 | | |
1156 | 1165 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
70 | 73 | | |
71 | 74 | | |
72 | 75 | | |
| |||
77 | 80 | | |
78 | 81 | | |
79 | 82 | | |
| 83 | + | |
| 84 | + | |
80 | 85 | | |
81 | 86 | | |
82 | 87 | | |
| |||
0 commit comments