add passive to addEventListener

This commit is contained in:
Isaac Connor 2020-03-05 14:10:35 -05:00
parent 17896b656a
commit c0b7aad2c8
1 changed files with 4 additions and 4 deletions

View File

@ -51,8 +51,8 @@ var Overlay = new Class({
},
show: function() {
this.mask.show();
window.addEventListener( 'resize', this.update.bind(this) );
window.addEventListener( 'scroll', this.update.bind(this) );
window.addEventListener( 'resize', this.update.bind(this), {passive: true} );
window.addEventListener( 'scroll', this.update.bind(this), {passive: true} );
this.element.tween( 'opacity', [0, 1.0] );
this.element.show();
this.element.position();
@ -80,8 +80,8 @@ var Overlay = new Class({
}
updateOverlayLoading();
this.loading.setStyle( 'display', 'block' );
window.addEventListener( 'resize', this.update.bind(this) );
window.addEventListener( 'scroll', this.update.bind(this) );
window.addEventListener( 'resize', this.update.bind(this), {passive: true} );
window.addEventListener( 'scroll', this.update.bind(this), {passive: true} );
},
hideAnimation: function() {
if ( this.loading ) {