export const clipboard = function(superClass) { return class extends superClass { copy(content) { const txtEl = document.createElement('input'); txtEl.type = 'hidden'; document.body.appendChild(txtEl); txtEl.value = content; navigator.clipboard.writeText(content); document.body.removeChild(txtEl); } }; };