- From: Aleksandar Totic via GitHub <sysbot+gh@w3.org>
- Date: Wed, 24 Jul 2019 17:41:57 +0000
- To: public-css-archive@w3.org
@christr: I think you meant
function observerCallback(entry, observer) {
let devicePixelBorderBoxRect = entry[0].devicePixelBorderBox;
render(devicePixelBorderBoxRect); // WebGL rendering
}
function rafCallback() {
observer.unobserve(myCanvas);
observer.observe(myCanvas, {box: 'device-pixel-border-box'});
}
var observer = new ResizeObserver(observerCallback);
document.requestAnimationFrame(rafCallback);
@dbaron that is very clever!
--
GitHub Notification of comment by atotic
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3554#issuecomment-514730227 using your GitHub account
Received on Wednesday, 24 July 2019 17:41:58 UTC