Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions packages/core/application/application-common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,28 @@ export class ApplicationCommon {
readonly loadAppCssEvent = 'loadAppCss';
readonly cssChangedEvent = 'cssChanged';

// Expose statically for backwards compat on AndroidApplication.on etc.
/**
* @deprecated Use `Application.android.on()` instead.
*/
static on: ApplicationEvents['on'] = globalEvents.on.bind(globalEvents);
/**
* @deprecated Use `Application.android.once()` instead.
*/
static once: ApplicationEvents['on'] = globalEvents.once.bind(globalEvents);
/**
* @deprecated Use `Application.android.off()` instead.
*/
static off: ApplicationEvents['off'] = globalEvents.off.bind(globalEvents);
/**
* @deprecated Use `Application.android.notify()` instead.
*/
static notify: ApplicationEvents['notify'] = globalEvents.notify.bind(globalEvents);
/**
* @deprecated Use `Application.android.hasListeners()` instead.
*/
static hasListeners: ApplicationEvents['hasListeners'] = globalEvents.hasListeners.bind(globalEvents);

// Application events go through the global events.
on: ApplicationEvents['on'] = globalEvents.on.bind(globalEvents);
once: ApplicationEvents['on'] = globalEvents.once.bind(globalEvents);
Expand Down