Skip to content

Commit 5f8d9b7

Browse files
committed
Extend window class with minimize and restore
1 parent 75fc97f commit 5f8d9b7

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Diff for: core/nut.js/lib/window.class.ts

+8
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,14 @@ export class Window implements WindowInterface {
8686
return this.providerRegistry.getWindow().focusWindow(this.windowHandle);
8787
}
8888

89+
async minimize() {
90+
return this.providerRegistry.getWindow().minimizeWindow(this.windowHandle);
91+
}
92+
93+
async restore() {
94+
return this.providerRegistry.getWindow().restoreWindow(this.windowHandle);
95+
}
96+
8997
async getElements(maxElements?: number): Promise<WindowElement> {
9098
return this.providerRegistry.getWindowElementInspector().getElements(this.windowHandle, maxElements);
9199
}

0 commit comments

Comments
 (0)