mirror of
https://github.com/taigrr/wails.git
synced 2026-04-02 05:08:54 -07:00
Update Browser runtime API
This commit is contained in:
@@ -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,
|
||||
};
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user