Add missing method declaration (#1308)

* Add missing method declaration

* Add eventsoff to the wrapper
This commit is contained in:
Ariel
2022-04-03 22:01:31 +10:00
committed by GitHub
parent d5a8ee0132
commit 2c8d94ca48
2 changed files with 12 additions and 0 deletions
@@ -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
*
+2
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;