Contact emails
dsl...@google.comExplainer
https://docs.google.com/document/d/1qGpql7OxFQT9JLTZW9rOKwcXvpXeLDY2pB6xRnhJHbI/edit#heading=h.d86ucna8g4c5Design docs
https://docs.google.com/document/d/1jq8QSCQRdNy99rnPusmW8is62c22PVuq-Sk-tMT2tRk/edit
Summary
The current implementation of the async clipboard API only supports text/plain, image/png, and text/html. SVG images are popular due to their ability to encode images in a space efficiently and their ability to maintain image quality even when zooming in. This feature adds image/svg+xml support to the async clipboard api. We initially want to enable this feature behind a flag.
Motivation
The SVG image format is becoming more common for the creation of icons and other images. This format can be used by: -Programs such as Inkscape, Adobe Illustrator, and other vector graphics editors -Sites that support SVG that may want to copy SVG images across websites such as Figma and Photopea By adding this format, we enable interoperability between chrome and these other programs.
Risks
Interoperability and Compatibility
There is some interoperability risk because chrome will be the first browser to support the SVG format on the clipboard. There haven't been any public signals from other browsers but there also haven't been any negative signals.
Gecko: No signal
WebKit: No signal
Web developers: No signals
Ergonomics
The risk is no higher than any of the other formats in the Clipboard API.
Activation
The feature is relatively easy to access. All one must do is specify the new format type as an argument.
Security
Similarly to HTML, SVG can contain malicious content. SVG is an XML based format, so it can contain javascript. We use the same sanitizer that HTML uses to remove script tags and other javascript that can be embedded in other elements.Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?
Yes
Yes The tests test equivalent structure after a write and read. They also test the removal of javascript elements.
https://chromium-review.googlesource.com/c/chromium/src/+/2315220Link to entry on the Chrome Platform Status
https://www.chromestatus.com/feature/5125790490427392
--