Skip to content

Clipboard copy support #381

Open
Open
@avaer

Description

@avaer

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions