When building a page, I understand it's good practice to try and minimise "layout thrashing" or "reflow", when the browser recalculates the dimensions and position of all the elements on the page. Paul Irish has produced a handy list of the processes that trigger reflows. He says:
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout.
How come the https://developer.mozilla.org/en/docs/Web/API/Window/matchMedia
method isn't on this list? Doesn't that involve measuring the window size? Can we use it without worrying about causing reflows?