@@ -210,6 +210,33 @@ Object.assign(SyntheticEvent.prototype, {
210
210
211
211
SyntheticEvent . Interface = EventInterface ;
212
212
213
+ /**
214
+ * Helper to reduce boilerplate when creating subclasses.
215
+ *
216
+ * @param {function } Class
217
+ * @param {?object } Interface
218
+ */
219
+ SyntheticEvent . augmentClass = function ( Class , Interface ) {
220
+ var Super = this ;
221
+
222
+ var E = function ( ) { } ;
223
+ E . prototype = Super . prototype ;
224
+ var prototype = new E ( ) ;
225
+
226
+ Object . assign ( prototype , Class . prototype ) ;
227
+ Class . prototype = prototype ;
228
+ Class . prototype . constructor = Class ;
229
+
230
+ Class . Interface = Object . assign ( { } , Super . Interface , Interface ) ;
231
+ Class . augmentClass = Super . augmentClass ;
232
+
233
+ PooledClass . addPoolingTo ( Class , PooledClass . fourArgumentPooler ) ;
234
+ } ;
235
+
236
+ /** Proxying after everything set on SyntheticEvent
237
+ * to resolve Proxy issue on some WebKit browsers
238
+ * in which some Event properties are set to undefined (GH#10010)
239
+ */
213
240
if ( __DEV__ ) {
214
241
if ( isProxySupported ) {
215
242
/*eslint-disable no-func-assign */
@@ -243,28 +270,6 @@ if (__DEV__) {
243
270
/*eslint-enable no-func-assign */
244
271
}
245
272
}
246
- /**
247
- * Helper to reduce boilerplate when creating subclasses.
248
- *
249
- * @param {function } Class
250
- * @param {?object } Interface
251
- */
252
- SyntheticEvent . augmentClass = function ( Class , Interface ) {
253
- var Super = this ;
254
-
255
- var E = function ( ) { } ;
256
- E . prototype = Super . prototype ;
257
- var prototype = new E ( ) ;
258
-
259
- Object . assign ( prototype , Class . prototype ) ;
260
- Class . prototype = prototype ;
261
- Class . prototype . constructor = Class ;
262
-
263
- Class . Interface = Object . assign ( { } , Super . Interface , Interface ) ;
264
- Class . augmentClass = Super . augmentClass ;
265
-
266
- PooledClass . addPoolingTo ( Class , PooledClass . fourArgumentPooler ) ;
267
- } ;
268
273
269
274
PooledClass . addPoolingTo ( SyntheticEvent , PooledClass . fourArgumentPooler ) ;
270
275
0 commit comments