Re: [csswg-drafts] [resize-observer] device-pixel-border-box size (#3554)

@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