Approximate browser and Qt event flow:
- Qt HTML5 platform plugin generates synthetic CTRL-C
- Qt event target copes content into internal Qt clipboard
This requires synchronous event handling since we must get to point 4 before returning from the copy handler.
The clipboard event implementations on different browsers seem to be divergent. See html_clipboard, which tests event handling with a <canvas> element. (testing on Safari, Chrome, and Firefox)
- Chrome seems to support clipboard events on the document only. The other browsers support clipboard events on the canvas as well.
- There is interaction between clipboard events and key events. Any preventDefault() on relevant key events will prevent clipboard events from firing. (on the document as well).
- Key handlers on the canvas element seem to (sometimes) block canvas clipboard events (even if they don't preventDefault), moreso if the key event handler is installed to run in the capturing phase.
Preliminary conclusion: It might just work. Interaction with emscripten keyboard handlers should be tested next.