@@ -210,6 +210,33 @@ Object.assign(SyntheticEvent.prototype, {
210210
211211SyntheticEvent . Interface = EventInterface ;
212212
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+ */
213240if ( __DEV__ ) {
214241 if ( isProxySupported ) {
215242 /*eslint-disable no-func-assign */
@@ -243,28 +270,6 @@ if (__DEV__) {
243270 /*eslint-enable no-func-assign */
244271 }
245272}
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- } ;
268273
269274PooledClass . addPoolingTo ( SyntheticEvent , PooledClass . fourArgumentPooler ) ;
270275
0 commit comments