5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-02 11:10:47 +08:00
wails/v3/plugins/browser/plugin.js
Lea Anthony ba82f27534 Fix Bug with nil parameters.
Added browser and kvstore plugins.
2023-03-20 20:28:33 +11:00

26 lines
508 B
JavaScript

/**
* Opens the given URL in the default browser.
* @param url {string} - The URL to open.
* @returns {Promise<void>}
*/
function OpenURL(url) {
return wails.Plugin("browser", "OpenURL", url);
}
/**
* Opens the given filename in the default browser.
* @param filename {string} - The file to open.
* @returns {Promise<void>}
*/
function OpenFile(filename) {
return wails.Plugin("browser", "OpenFile", filename);
}
export default {
Browser: {
OpenURL,
OpenFile,
}
};