File tree Expand file tree Collapse file tree
packages/melonjs/src/application Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -318,10 +318,15 @@ export default class Application {
318318 setDefaultGame ( this ) ;
319319
320320 // bridge DOM events to the melonJS event system
321- this . _onResize = ( e : Event ) => emit ( WINDOW_ONRESIZE , e ) ;
322- this . _onOrientationChange = ( e : Event ) =>
321+ this . _onResize = ( e : Event ) => {
322+ emit ( WINDOW_ONRESIZE , e ) ;
323+ } ;
324+ this . _onOrientationChange = ( e : Event ) => {
323325 emit ( WINDOW_ONORIENTATION_CHANGE , e ) ;
324- this . _onScroll = ( e : Event ) => emit ( WINDOW_ONSCROLL , e ) ;
326+ } ;
327+ this . _onScroll = ( e : Event ) => {
328+ emit ( WINDOW_ONSCROLL , e ) ;
329+ } ;
325330 globalThis . addEventListener ( "resize" , this . _onResize ) ;
326331 globalThis . addEventListener ( "orientationchange" , this . _onOrientationChange ) ;
327332 if ( device . screenOrientation ) {
You can’t perform that action at this time.
0 commit comments