Answers for "javascript trigger screen resize"

1

trigger window resize

// Cross-browser solution (IE support)
var resizeEvent = window.document.createEvent('UIEvents'); 
resizeEvent.initUIEvent('resize', true, false, window, 0); 
window.dispatchEvent(resizeEvent);
Posted by: Guest on April-11-2020
0

Get width of screen on resize event

@HostListener('window:resize', ['$event'])
onResize(event) {
  this.innerWidth = window.innerWidth;
}
Posted by: Guest on July-01-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language