Update Browser runtime API

This commit is contained in:
Lea Anthony
2020-10-20 07:16:56 +11:00
parent 307e07b4c8
commit 9e0023961b
2 changed files with 6 additions and 18 deletions

View File

@@ -10,28 +10,16 @@ The lightweight framework for web-like apps
/* jshint esversion: 6 */
/**
* Opens the given URL in the system browser
* Opens the given URL or Filename in the system browser
*
* @export
* @param {string} url
* @param {string} target
* @returns
*/
function OpenURL(url) {
return window.wails.Browser.OpenURL(url);
}
/**
* Opens the given filename using the system's default file handler
*
* @export
* @param {sting} filename
* @returns
*/
function OpenFile(filename) {
return window.wails.Browser.OpenFile(filename);
export function Open(target) {
return window.wails.Browser.Open(target);
}
module.exports = {
OpenURL: OpenURL,
OpenFile: OpenFile
Open: Open,
};

View File

@@ -1,6 +1,6 @@
{
"name": "@wails/runtime",
"version": "1.0.6",
"version": "1.0.7",
"description": "Wails V2 Javascript runtime library",
"main": "main.js",
"types": "runtime.d.ts",