The Async Clipboard API is limited to handling text and images on most browsers, but support varies. The Async Clipboard API addresses these issues, providing a well-defined permissions model that doesn't block the page. At the same time, the permissions put in place around document.execCommand() for clipboard interaction are loosely defined and vary between browsers. Imagine adding permissions into the mix, requiring that the browser block the page while requesting clipboard access. That would block the page while waiting on the disk or network. The browser may need to load or inline linked resources from a pasted document. Time consuming sanitization or image decoding might be needed before content can be safely pasted. That's fine for small bits of text, but there are many cases where blocking the page for clipboard transfer is a poor experience. Though widely supported, this method of cutting and pasting came at a cost: clipboard access was synchronous, and could only read and write to the DOM. The traditional way of getting access to the system clipboard was via document.execCommand() for clipboard interactions.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |