Uncapped window.devicePixelRatio, with the 0/undefined guard.
Also guards window itself, so a node test or the published library bundle
under SSR gets a missing display rather than a ReferenceError from a bare
window.devicePixelRatio. 1 is the honest answer when there is no display
at all: CSS resolution, which is what the cap defaults to anyway.
Uncapped
window.devicePixelRatio, with the 0/undefined guard.Also guards
windowitself, so a node test or the published library bundle under SSR gets a missing display rather than a ReferenceError from a barewindow.devicePixelRatio. 1 is the honest answer when there is no display at all: CSS resolution, which is what the cap defaults to anyway.