[w3c/clipboard-apis] "check clipboard read permission" needs to be an async operation? (#63)

https://w3c.github.io/clipboard-apis/#h-clipboard-readtext calls https://w3c.github.io/clipboard-apis/#check-clipboard-read-permission in the synchronous parts of the steps.

However https://w3c.github.io/clipboard-apis/#check-clipboard-read-permission depends on  https://w3c.github.io/permissions/#request-permission-to-use which says "Ask the user’s permission" which would have to be async.

For this to work, I think the "check clipboard read permission" bit has be in the "in parallel" steps, which would also imply that the promise returned is *never* rejected at the time it is returned, which can be detecting by resolving another promise right afterwards and checking if the returned promise as been rejected yet.

It's not very likely that web content would come to depend on such timing, but having the spec and implementation align would still be good. (It looks like Chromium can return an already-rejected promise.)

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/clipboard-apis/issues/63

Received on Tuesday, 16 January 2018 13:11:55 UTC