Skip to content
This repository was archived by the owner on Jul 30, 2025. It is now read-only.

Commit f66d4f9

Browse files
committed
feat: createWindow API should allow window creation from URL
Right now, it only supports creating a window to execute a Kui command line. This PR also updates the `createWindow` API so that it returns a `Promise` that resolves when the window is closed.
1 parent 8ec5780 commit f66d4f9

File tree

3 files changed

+349
-319
lines changed

3 files changed

+349
-319
lines changed

packages/core/src/index.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,4 +286,15 @@ export {
286286

287287
export * from './api/window-events'
288288

289-
export type CreateWindowFunction = (argv: string[], prefs?: import('./models/SubwindowPrefs').default) => void
289+
/**
290+
* Open a new Kui window.
291+
*
292+
* @param argv If given a string, it will be treated as a URL to be
293+
* displayed in the new Kui window. Otherwise, it will be treated as a
294+
* command line to be executed in the new window.
295+
*
296+
* @param prefs? Options for the new window, such as desired width and height.
297+
*
298+
* @return a `Promise` that will resolve when the window closes
299+
*/
300+
export type CreateWindowFunction = (argv: string | string[], prefs?: import('./models/SubwindowPrefs').default) => void

0 commit comments

Comments
 (0)