Я использую следующий скрипт: он работает локально в visual studio. но на сервере он выбрасывает
"Невозможно прочитать свойство 'write text' of undefined"
function GetCopyText(thislink) {
var Content = thislink.parentNode.parentNode.parentNode.parentElement.parentElement.parentElement.parentElement.children[2].children[0].children[0].innerText;
navigator.clipboard.writeText(Content).then(function () {
// alert('Async: Copying to clipboard was successful!');
}, function (err) {
console.error('Async: Could not copy text: ', err);
});
}