Есть ли способ создать кнопку копирования в буфер обмена в Safari?Это мой код, но он не работает в Safari.
<input type="text" id="copy"/>
<button class="copy-button" id="button-copy">Copy</button>
<script>
jQuery(document).ready(function($){
document.querySelector('#button-copy').addEventListener('click',
function(e) {
$(this).prev().select();
document.execCommand("copy");
});
});
</script>