Skip to content

Commit 04011b5

Browse files
authored
🤖 Merge PR DefinitelyTyped#72476 [novnc__novnc]: Add missing RFB event "clippingviewport" and update version to match NoVnc v1.6.0 by @pgmystery
1 parent 9015868 commit 04011b5

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

‎types/novnc__novnc/index.d.ts‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,12 @@ declare module "@novnc/novnc/lib/rfb" {
102102
* value of `capabilities`.
103103
*/
104104
capabilities: CustomEvent<{ capabilities: NoVncClient["capabilities"] }>;
105+
106+
/**
107+
* The `clippingviewport` event is fired whenever `clippingViewport` changes between true and false.
108+
* The `detail` property is a `boolean` with the new value of `clippingViewport`.
109+
*/
110+
clippingviewport: CustomEvent<NoVncClient["clippingViewport"]>;
105111
}
106112

107113
type NoVncEventType = keyof NoVncEvents;
@@ -218,6 +224,12 @@ declare module "@novnc/novnc/lib/rfb" {
218224
power: boolean;
219225
};
220226

227+
/**
228+
* Is a `boolean` indicating if the remote session is currently being clipped to its container.
229+
* Only relevant if `clipViewport` is enabled.
230+
*/
231+
readonly clippingViewport: boolean;
232+
221233
/**
222234
* Disconnect from the server.
223235
*/

‎types/novnc__novnc/novnc__novnc-tests.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ const rfb = new RFB(window.document.body, "wss://example.local", {
1414
rfb.viewOnly; // $ExpectType boolean
1515
rfb.focusOnClick; // $ExpectType boolean
1616
rfb.clipViewport; // $ExpectType boolean
17+
rfb.clippingViewport; // $ExpectType boolean
1718
rfb.dragViewport; // $ExpectType boolean
1819
rfb.scaleViewport; // $ExpectType boolean
1920
rfb.resizeSession; // $ExpectType boolean

‎types/novnc__novnc/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"private": true,
33
"name": "@types/novnc__novnc",
4-
"version": "1.5.9999",
4+
"version": "1.6.9999",
55
"projects": [
66
"https://github.com/novnc/noVNC"
77
],

0 commit comments

Comments
 (0)