mirror of
https://github.com/taigrr/wails.git
synced 2026-04-17 12:15:02 -07:00
Misc fixes for events
This commit is contained in:
@@ -137,17 +137,11 @@ export function Notify(notifyMessage) {
|
||||
*/
|
||||
export function Emit(eventName) {
|
||||
|
||||
// Calculate the data
|
||||
if (arguments.length > 1) {
|
||||
// Notify backend
|
||||
const payload = {
|
||||
name: eventName,
|
||||
data: [].slice.apply(arguments).slice(1),
|
||||
};
|
||||
SendMessage('Ej' + JSON.stringify(payload));
|
||||
} else {
|
||||
SendMessage('ej' + eventName);
|
||||
}
|
||||
const payload = {
|
||||
name: eventName,
|
||||
data: [].slice.apply(arguments).slice(1),
|
||||
};
|
||||
SendMessage('Ej' + JSON.stringify(payload));
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user