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
Mostly authors are only interested in reading representations from the clipboard that they know how to ingest into their app. For building a clipboard examiner app like this, however, you don't know what types you need to request until after you read.
Since the current proposal requires the author to explicitly list every custom mime-type before they call read, it seems like a the clipboard examiner app won't be able to show everything that could possibly be requested from the clipboard with the current proposal.
There was an alternative considered for unsanitized:true in the explainer that said it would cause all representations to be read unsanitized. That could solve the problem, but it would prevent the author from simultaneously requesting a sanitized copy of the well-known representations if they that's what they wanted.
Another option may be to move the unsanitized option to the ClipboardItem.getType call instead of the Clipboard.read.
I see where the ClipboardItem.prototype.types question in the other issue comes from now, I think. It would make sense to me if that lists all the types (lexicographically sorted) that the ClipboardItem contains. Otherwise you don't know what you can getType().
@annevk Agreed that ClipboardItem.prototype.types should list all the types(both custom & well known formas), but not sure about sorting lexicographically as there are platform specific requirements where the most desired format should be listed at the top. In this case, it would be custom formats at the top, well-known formats come after.
Mostly authors are only interested in reading representations from the clipboard that they know how to ingest into their app. For building a clipboard examiner app like this, however, you don't know what types you need to request until after you read.
Since the current proposal requires the author to explicitly list every custom mime-type before they call read, it seems like a the clipboard examiner app won't be able to show everything that could possibly be requested from the clipboard with the current proposal.
There was an alternative considered for
unsanitized:true
in the explainer that said it would cause all representations to be read unsanitized. That could solve the problem, but it would prevent the author from simultaneously requesting a sanitized copy of the well-known representations if they that's what they wanted.Another option may be to move the unsanitized option to the
ClipboardItem.getType
call instead of theClipboard.read
.@snianu
The text was updated successfully, but these errors were encountered: