Re: [csswg-drafts] [cssom-view] No way to access the viewport size without losing precision. (#5260)

Another workaround seems to be this:

```js
const dpr = window.devicePixelRatio;
const width = Math.floor( window.innerWidth * dpr ) / dpr;
const height = Math.floor( window.innerHeight * dpr ) / dpr;
```

But I vote for turning these into doubles too.

-- 
GitHub Notification of comment by mrdoob
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5260#issuecomment-705752010 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 8 October 2020 18:39:29 UTC