function watchWindowResize() {
  var self = this;
  window.addEventListener( 'resize', function() {
    self.handleViewportChange();
  } );
}
/**
 * Add event listener for changes in the viewport size.
 */
Add event listener for changes in the viewport size.
Add event listener for changes in the viewport size .
function watchWindowResize() {
  var self = this;
  window.addEventListener( 'resize', function() {
    self.handleViewportChange();
  } );
}
function watchWindowResize ( ) { var self = this ; window . addEventListener ( 'resize' , function ( ) { self . handleViewportChange ( ) ; } ) ; }
Add event listener for changes in the viewport size.
Add event listener for changes in the viewport size .