Accessing the OS clipboard using browser JavaScript has been possible for several years using document.execCommand(), but we now have a better option in the asynchronous Clipboard API. Unfortunately, there are some problems with document.execCommand(): clipboard access is synchronous, which has performance and security implications support is patchy, especially on older versions of Safari on macOS