Add 'RFB::clipboardreceived' event
This commit is contained in:
parent
6cda832b8f
commit
817c1dee5f
12
core/rfb.js
12
core/rfb.js
|
|
@ -2335,11 +2335,13 @@ export default class RFB extends EventTargetMixin {
|
||||||
|
|
||||||
_writeClipboard(text) {
|
_writeClipboard(text) {
|
||||||
if (this._viewOnly) return;
|
if (this._viewOnly) return;
|
||||||
if (this._asyncClipboard.writeClipboard(text)) return;
|
if (!(this._asyncClipboard.writeClipboard(text))) {
|
||||||
// Fallback clipboard
|
// Fallback clipboard
|
||||||
this.dispatchEvent(
|
this.dispatchEvent(
|
||||||
new CustomEvent("clipboard", {detail: {text: text}})
|
new CustomEvent("clipboard", {detail: {text: text}})
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
this.dispatchEvent(new CustomEvent("clipboardreceived"));
|
||||||
}
|
}
|
||||||
|
|
||||||
_handleServerCutText() {
|
_handleServerCutText() {
|
||||||
|
|
|
||||||
|
|
@ -96,6 +96,12 @@ protocol stream.
|
||||||
- The `clipboard` event is fired when clipboard data is received from
|
- The `clipboard` event is fired when clipboard data is received from
|
||||||
the server.
|
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)
|
[`clippingviewport`](#clippingviewport)
|
||||||
- The `clippingviewport` event is fired when `RFB.clippingViewport` is
|
- The `clippingviewport` event is fired when `RFB.clippingViewport` is
|
||||||
updated.
|
updated.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue