> On 2015-05-23 5:02 AM, Jesper Kristensen wrote: >> It would be nice of you could also support paste.
Ehsan Akhgari writes: > Handling paste is a difficult topic, and I definitely don't have a > good answer yet. > > Prompting for paste has two issues: > 2. The synchronous nature of the execCommand API mandates a modal > prompt, which is terrible for user experience, so we would > probably need some kind of an out of band permission request. A synchronous API would be a problem for pasting even without the prompt, unless perhaps pasting data only from within the same process. Fetching the clipboard from another application, or process, is an intrinsically asynchronous operation. Attempts have been made, with varying degrees of success, to dress up the asynchronous fetch as a synchronous operation. DataTransfer usage may have the luxury of being able to pre-fetch the data in all formats before dispatching the event referencing the DataTransfer, which despite the inefficiencies can provide a synchronous API. I'm not familiar with execCommand, but sounds like even that would not be possible. We shouldn't expose any more asynchronous operations in synchronous APIs. _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform