2 ms·
Awesome! I was making exactly this library 13 years ago but only made it as far as creating CSS and other asset inlining+normalization tools before I ran into a
by Sephr 1y ago
Awesome! I was making exactly this library 13 years ago but only made it as far as creating CSS and other asset inlining+normalization tools before I ran into a few major roadblocks.
The most significant roadblock was that drawing SVG <foreignObject> with inline subresources (data: and blob: URIs) tainted canvases in Chrome and Safari, and this was partially resolved in 2019[1].
Notably, some issues still remain but apparently it's now workable. As is apparent from snapDOM, completely accurate CSS normalization is still an unsolved problem.
While I'm excited to see the HTML-in-foreignObject use case mature, it is also important to point out that the Media Capture API now has the ability to capture individual elements natively in Chrome[2].
1. https://issues.chromium.org/issues/41054640#comment49 https://issues.chromium.org/issues/41054640#comment49
2. https://developer.mozilla.org/en-US/docs/Web/API/CropTarget/fromElement_static https://developer.mozilla.org/en-US/docs/Web/API/CropTarget/...