Skip to content

Commit

Permalink
Extend window class with minimize and restore
Browse files Browse the repository at this point in the history
  • Loading branch information
s1hofmann committed Apr 10, 2024
1 parent 75fc97f commit 5f8d9b7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions core/nut.js/lib/window.class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,14 @@ export class Window implements WindowInterface {
return this.providerRegistry.getWindow().focusWindow(this.windowHandle);
}

async minimize() {
return this.providerRegistry.getWindow().minimizeWindow(this.windowHandle);
}

async restore() {
return this.providerRegistry.getWindow().restoreWindow(this.windowHandle);
}

async getElements(maxElements?: number): Promise<WindowElement> {
return this.providerRegistry.getWindowElementInspector().getElements(this.windowHandle, maxElements);
}
Expand Down

0 comments on commit 5f8d9b7

Please sign in to comment.