Created
October 12, 2021 11:06
-
-
Save charisTheo/3363fb9d4b69f4e3fbd9d63f3dff97b7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (isSafari()) { | |
const imageMimeType = getImageMimeTypeFromUrl(src) | |
await navigator.clipboard.write([ | |
new ClipboardItem({ | |
[imageMimeType]: getImageBlobFromUrl(src) | |
}) | |
]) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment