Hacker News new | ask | show | jobs
by ape4 815 days ago
Its too bad browsers don't support this.

    // Do CSS layout in the regular document
    const doc = new CssLayout(document);
    doc.layout(...);

    // Do CSS layout on your own canvas
    const mycanvas = new CssLayout(document.getElementById('mycanvas'));
    mycanvas.layout(...);
1 comments

The security implications would be interesting, unless you tainted the canvas (which makes it instantly less useful).
What security vulnerability becomes possible with native CSS-in-canvas support that's not already possible today? Or becomes easier?
As I understand the proposal, everything about visited link colors, for instance. Lots of cross-origin leaks. New forms of image leaks.