Skip to content

resized

Mike Byrne edited this page Jan 25, 2022 · 2 revisions

description

Debounces window resize, also checks if current media query has changed

requires

  • getCurrentMediaQuery
  • triggerCustomEvent
  • global variable of: A17.currentMediaQuery

parameters

  • none

returns

  • sets A17.currentMediaQuery to new value
  • fires debounced events to tell application about the resize and media query update

example usage:

document.addEventListener('DOMContentLoaded', function(){
  resized();
});