mirror of
https://github.com/wailsapp/wails.git
synced 2026-03-14 22:55:48 +01:00
Support Print in JS runtime
This commit is contained in:
parent
90b7d5f519
commit
5fd8312f63
2 changed files with 22 additions and 0 deletions
|
|
@ -35,6 +35,16 @@ export function Trace(message) {
|
|||
sendLogMessage('T', message);
|
||||
}
|
||||
|
||||
/**
|
||||
* Log the given message with the backend
|
||||
*
|
||||
* @export
|
||||
* @param {string} message
|
||||
*/
|
||||
export function Print(message) {
|
||||
sendLogMessage('P', message);
|
||||
}
|
||||
|
||||
/**
|
||||
* Log the given debug message with the backend
|
||||
*
|
||||
|
|
|
|||
|
|
@ -11,6 +11,16 @@ The lightweight framework for web-like apps
|
|||
/* jshint esversion: 6 */
|
||||
|
||||
|
||||
/**
|
||||
* Log the given message with the backend
|
||||
*
|
||||
* @export
|
||||
* @param {string} message
|
||||
*/
|
||||
function Print(message) {
|
||||
window.wails.Log.Print(message);
|
||||
}
|
||||
|
||||
/**
|
||||
* Log the given trace message with the backend
|
||||
*
|
||||
|
|
@ -72,6 +82,8 @@ function Fatal(message) {
|
|||
}
|
||||
|
||||
module.exports = {
|
||||
Print: Print,
|
||||
Trace: Trace,
|
||||
Debug: Debug,
|
||||
Info: Info,
|
||||
Warning: Warning,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue