5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-02 18:10:48 +08:00
wails/v3/internal/runtime/desktop/main.js
Lea Anthony 0e8144e52f
Tidy up
2023-01-30 19:52:53 +11:00

49 lines
908 B
JavaScript

/*
_ __ _ __
| | / /___ _(_) /____
| | /| / / __ `/ / / ___/
| |/ |/ / /_/ / / (__ )
|__/|__/\__,_/_/_/____/
The electron alternative for Go
(c) Lea Anthony 2019-present
*/
/* jshint esversion: 9 */
import {Info, Warning, Error, Question, OpenFile, SaveFile, dialogCallback, dialogErrorCallback, } from "./dialogs";
import * as Clipboard from './clipboard';
import {newWindow} from "./window";
// Internal wails endpoints
window.wails = {
...newRuntime(-1),
};
window._wails = {
dialogCallback,
dialogErrorCallback,
}
export function newRuntime(id) {
return {
Clipboard: {
...Clipboard
},
Dialog: {
Info,
Warning,
Error,
Question,
OpenFile,
SaveFile,
},
Window: newWindow(id),
}
}
if (DEBUG) {
console.log("Wails v3.0.0 Debug Mode Enabled");
}