Skip to content

Commit

Permalink
[v2] frontend/runtime/wrapper: return function return value in runtim…
Browse files Browse the repository at this point in the history
…e wrapper
  • Loading branch information
zllovesuki committed Mar 1, 2023
1 parent c6146cc commit 41a8228
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions v2/internal/frontend/runtime/wrapper/runtime.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,19 @@ export function LogFatal(message) {
}

export function EventsOnMultiple(eventName, callback, maxCallbacks) {
window.runtime.EventsOnMultiple(eventName, callback, maxCallbacks);
return window.runtime.EventsOnMultiple(eventName, callback, maxCallbacks);
}

export function EventsOn(eventName, callback) {
EventsOnMultiple(eventName, callback, -1);
return EventsOnMultiple(eventName, callback, -1);
}

export function EventsOff(eventName, ...additionalEventNames) {
return window.runtime.EventsOff(eventName, ...additionalEventNames);
}

export function EventsOnce(eventName, callback) {
EventsOnMultiple(eventName, callback, 1);
return EventsOnMultiple(eventName, callback, 1);
}

export function EventsEmit(eventName) {
Expand Down

0 comments on commit 41a8228

Please sign in to comment.