Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
c_s_guy
· 4y ago · 0 comments
May I ask why `window.resize` is used over `matchMedia`[0] to detect DPR changes? Is one approach better than the other?
[0]
https://developer.mozilla.org/en-US/docs/Web/API/Window/devi...
Comments
[–]
ygra
4y ago
The resize event is compatible with IE < 10. Depending on compatibility guarantees this can be a reason.