Open
Description
We already support clipboard paste
. Ihe backing API is GLFW.
This works for browser copy
:
selection = window.getSelection();
selection.removeAllRanges();
textNode = document.createTextNode('lol')
document.body.appendChild(textNode)
range = document.createRange();
range.setStart(textNode, 1);
range.setEnd(textNode, 3);
selection.addRange(range)
document.execCommand('copy')
document.body.removeChild(textNode)
Our implementation of document.execCommand()
is here.