W3C home > Mailing lists > Public > public-css-archive@w3.org > July 2019

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

From: Aleksandar Totic via GitHub <sysbot+gh@w3.org>
Date: Wed, 24 Jul 2019 17:41:57 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-514730227-1563990116-sysbot+gh@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

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:50 UTC