Add 'RFB::clipboardreceived' event
This commit is contained in:
parent
6cda832b8f
commit
817c1dee5f
|
|
@ -2335,12 +2335,14 @@ export default class RFB extends EventTargetMixin {
|
|||
|
||||
_writeClipboard(text) {
|
||||
if (this._viewOnly) return;
|
||||
if (this._asyncClipboard.writeClipboard(text)) return;
|
||||
if (!(this._asyncClipboard.writeClipboard(text))) {
|
||||
// Fallback clipboard
|
||||
this.dispatchEvent(
|
||||
new CustomEvent("clipboard", {detail: {text: text}})
|
||||
);
|
||||
}
|
||||
this.dispatchEvent(new CustomEvent("clipboardreceived"));
|
||||
}
|
||||
|
||||
_handleServerCutText() {
|
||||
Log.Debug("ServerCutText");
|
||||
|
|
|
|||
|
|
@ -96,6 +96,12 @@ protocol stream.
|
|||
- The `clipboard` event is fired when clipboard data is received from
|
||||
the server.
|
||||
|
||||
['clipboardreceived'](#clipboardreceived)
|
||||
- The `clipboardreceived` event is fired after the `clipboard` event
|
||||
or after the clipboard has been updated through the
|
||||
[Clipboard module](API-internal.md#11-module-list). The copied text
|
||||
has already been written to the system clipboard or the clipboard panel.
|
||||
|
||||
[`clippingviewport`](#clippingviewport)
|
||||
- The `clippingviewport` event is fired when `RFB.clippingViewport` is
|
||||
updated.
|
||||
|
|
|
|||
Loading…
Reference in New Issue