Skip to content

noeldelgado/dpr-change

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dpr-change npm-image license-image

Subscribe to devicePixelRatio change event

Install

npm i dpr-change --save

Usage

import DPR from 'dpr-change';

function _handleDPRChange (ev) {
  console.log(`devicePixelRatio changed: ${ev.devicePixelRatio}`);
}

DPR.addEventListener('change', _handleDPRChange);

License

MIT © Noel Delgado

About

🔍 Custom devicePixelRatio change event

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published