You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Chrome is working on improving the ability to copy SVG to the clipboard, can you reuse the Async Clipboard API and add image/svg+xml? We need to test that it doesn't crash before shipping.
awaitnavigator.clipboard.writeText(svgString)// const plainTextBlob = new Blob([svgString], { type: 'text/plain' })// Copying image/svg+xml is not yet supported in Chrome and crashes the tab// await navigator.clipboard.write([// new ClipboardItem({// [blob.type]: blob,// 'text/plain': plainTextBlob,// }),// ])
Now you can use ClipboardItem.supports('image/svg+xml') to detect if SVG is supported.
The text was updated successfully, but these errors were encountered:
Chrome is working on improving the ability to copy SVG to the clipboard, can you reuse the Async Clipboard API and add
image/svg+xml
? We need to test that it doesn't crash before shipping.9612565
Now you can use
ClipboardItem.supports('image/svg+xml')
to detect if SVG is supported.The text was updated successfully, but these errors were encountered: