When creating a webpage, it's important to minimize "layout thrashing" or "reflow", which occurs when the browser recalculates the dimensions and positions of all elements on the page. Paul Irish has compiled a valuable list of processes that trigger reflows, stating:
Typically, any APIs that provide layout metrics synchronously will result in forced reflow/layout.
Why is the method
https://developer.mozilla.org/en/docs/Web/API/Window/matchMedia
not included in this list? Doesn't it involve measuring the window size? Can we safely use it without causing reflows?