mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
use window matchMedia.
This commit is contained in:
@ -513,7 +513,7 @@
|
||||
this.unsubscribePixelRatioChange()
|
||||
}
|
||||
|
||||
const media = matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`)
|
||||
const media = window.matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`)
|
||||
media.addEventListener('change', this.onPixelRatioChange)
|
||||
this.unsubscribePixelRatioChange = () => {
|
||||
media.removeEventListener('change', this.onPixelRatioChange)
|
||||
|
Reference in New Issue
Block a user