One problem with async blob creation I ran into is dynamically created
blobs of unknown type:
navigator.clipboard.write([
new ClipboardItem({
'foo/bar': new Promise(async (resolve) => {
// Obtain blob data somehow, the type `foo/bar` will be dynamic.
resolve(new Blob([data], { type: 'foo/bar' }));
}),
}),
]);
You need to know `foo/bar` for passing it to `ClipboardItem`, but it may
only be available after the data has been created. Since Safari and Chrome
expire user gestures differently (see
https://bugs.webkit.org/show_bug.cgi?id=222262#c5), this renders some copy
use cases currently impossible.
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CALgRrLk728Y92SKX%2BEw0mPC_OhTkGqU9geyC%3D70gn4%2BGPPskkA%40mail.gmail.com.