5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-03 03:21:32 +08:00

Add missing method declaration (#1308)

* Add missing method declaration

* Add eventsoff to the wrapper
This commit is contained in:
Ariel 2022-04-03 14:01:31 +02:00 committed by GitHub
parent d5a8ee0132
commit 2c8d94ca48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 0 deletions

View File

@ -34,6 +34,16 @@ export function EventsOn(eventName, callback) {
OnMultiple(eventName, callback, -1);
}
/**
* Unregisters the listener for the given event name
*
* @export
* @param {string} eventName
*/
export function EventsOff(eventName) {
return window.runtime.EventsOff(eventName);
}
/**
* Registers an event listener that will be invoked once then destroyed
*

View File

@ -17,6 +17,8 @@ export interface runtime {
EventsOnce(eventName: string, callback: (data?: any) => void): void;
EventsOff(eventName: string): void;
LogTrace(message: string): void;
LogDebug(message: string): void;