> Adoption expectation > Excel online is ready to use this API. They are trying to move away from > DataTransfer APIs and use Async clipboard APIs where web custom format is > supported along with other benefits from async usage. > > Adoption plan > Support for async clipboard API and web custom format is already in inner > rings, so once this gets added to the clipboard API, Excel would be ready > to use it right away. >
As the author of the web custom formats article <https://developer.chrome.com/blog/web-custom-formats-for-the-async-clipboard-api/>, just for me to better understand: the problem is that the clipboard gets populated with `text/html` by random (web or native) apps. If the clipboard were populated from the start with `web text/html`, the contents could be read unsanitized, even without this new parameter. So this new parameter is the escape hatch that developers can use via `navigator.clipboard.read({unsanitized: ["text/html"]})`. An immediate question that I ask myself is whether this mechanism could be expanded to other values than just `"text/html"`. For example, could one do `navigator.clipboard.read({unsanitized: ["image/avif"]})` and expect it to work (when an AVIF image is on the clipboard)? Reading the relevant section in the explainer <https://github.com/w3c/editing/blob/gh-pages/docs/clipboard-unsanitized/explainer.md#read>, it seems hardcoded to ignore any other value than `"text/html"`, so something like `navigator.clipboard.read({unsanitized: ["hahaha/lol", "text/html", "application/json", "text/plain"]})` would work. Is this correct? > Sample links > > https://viridian-hypnotic-cut.glitch.me/ > FWIW, this demo was initially a bit misleading, since I expected "some text" to be on the clipboard, or whatever I put into the `contenteditable` box, but it's hardcoded. Maybe remove the box. -- You received this message because you are subscribed to the Google Groups "blink-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscr...@chromium.org. To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CALgRrLmeVZ8tn2KNrCFu_oCrkNZ_4icKUVU7P7mTMR02NNepeQ%40mail.gmail.com.