Hacker News new | ask | show | jobs
by c_s_guy 1565 days ago
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...

1 comments

The resize event is compatible with IE < 10. Depending on compatibility guarantees this can be a reason.